-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib{c,sys}: return wrapped syscall APIs to libc
These provide standard APIs, but are implemented using another system call (e.g., pipe implemented in terms of pipe2) or are interposed by the threading library to support cancelation. After discussion with kib (see D44111), I've concluded that it is better to keep most public interfaces in libc with as little as possible in libsys. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44241
- Loading branch information
1 parent
ef5fddd
commit d7847a8
Showing
72 changed files
with
125 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,9 +6,11 @@ | |
FBSD_1.0 { | ||
_mcount; | ||
__flt_rounds; | ||
brk; | ||
fpgetmask; | ||
fpgetround; | ||
fpgetsticky; | ||
fpsetmask; | ||
fpsetround; | ||
sbrk; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# libc-specific portion of the system call interface | ||
|
||
.PATH: ${LIBC_SRCTOP}/sys | ||
|
||
# Most of the implementation is shared with libsys: | ||
.include "${LIBSYS_SRCTOP}/Makefile.sys" | ||
|
||
# emit empty assembly stubs for syscalls in dynamic libc | ||
SHARED_CFLAGS+= -D'_SYSCALL_BODY(name)=' | ||
|
||
SYM_MAPS+= ${LIBC_SRCTOP}/sys/Symbol.map | ||
|
||
# Add the interposer wrappers | ||
SRCS+= ${INTERPOSED:S/$/.c/} | ||
|
||
# Pseudo system calls implemented atop other interfaces. | ||
SRCS+= \ | ||
POSIX2x_Fork.c \ | ||
brk.c \ | ||
closefrom.c \ | ||
compat-stub.c \ | ||
creat.c \ | ||
getdents.c \ | ||
lockf.c \ | ||
lstat.c \ | ||
mknod.c \ | ||
pipe.c \ | ||
recv.c \ | ||
recvmmsg.c \ | ||
send.c \ | ||
sendmmsg.c \ | ||
shm_open.c \ | ||
stat.c \ | ||
vadvise.c \ | ||
wait.c \ | ||
wait3.c \ | ||
waitid.c \ | ||
waitpid.c |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
FBSD_1.0 { | ||
accept; | ||
aio_suspend; | ||
close; | ||
connect; | ||
fcntl; | ||
fork; | ||
fsync; | ||
msync; | ||
nanosleep; | ||
open; | ||
pipe; | ||
poll; | ||
pselect; | ||
ptrace; | ||
read; | ||
readv; | ||
recvfrom; | ||
recvmsg; | ||
select; | ||
sendmsg; | ||
sendto; | ||
shm_open; | ||
sigaction; | ||
sigprocmask; | ||
sigsuspend; | ||
sigtimedwait; | ||
sigwait; | ||
sigwaitinfo; | ||
vadvise; | ||
wait4; | ||
write; | ||
writev; | ||
}; | ||
|
||
FBSD_1.1 { | ||
closefrom; | ||
}; | ||
|
||
FBSD_1.2 { | ||
pdfork; | ||
}; | ||
|
||
FBSD_1.3 { | ||
accept4; | ||
wait6; | ||
}; | ||
|
||
FBSD_1.4 { | ||
ppoll; | ||
numa_setaffinity; | ||
numa_getaffinity; | ||
sendmmsg; | ||
recvmmsg; | ||
}; | ||
|
||
FBSD_1.5 { | ||
clock_nanosleep; | ||
fdatasync; | ||
getdents; | ||
kevent; | ||
lstat; | ||
mknod; | ||
stat; | ||
}; | ||
|
||
FBSD_1.6 { | ||
shm_create_largepage; | ||
}; | ||
|
||
FBSD_1.7 { | ||
_Fork; | ||
}; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.