diff options
author | ru <ru@FreeBSD.org> | 2001-10-26 17:38:20 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2001-10-26 17:38:20 +0000 |
commit | 5cf7b5f41f4236d42751f1ffbb7c54d5160772ca (patch) | |
tree | 8aa1b798dafa0810da76835d9fb76f6cf3efa499 /lib | |
parent | efc392e6af8312d69312f3d4ff5bc8e558301448 (diff) | |
download | FreeBSD-src-5cf7b5f41f4236d42751f1ffbb7c54d5160772ca.zip FreeBSD-src-5cf7b5f41f4236d42751f1ffbb7c54d5160772ca.tar.gz |
Remove the internal implementation details of wrapping syscalls,
which do not match the reality anyway.
Approved by: deischen, bde
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/sys/accept.2 | 24 | ||||
-rw-r--r-- | lib/libc/sys/bind.2 | 21 | ||||
-rw-r--r-- | lib/libc/sys/close.2 | 21 | ||||
-rw-r--r-- | lib/libc/sys/connect.2 | 24 | ||||
-rw-r--r-- | lib/libc/sys/dup.2 | 46 | ||||
-rw-r--r-- | lib/libc/sys/execve.2 | 16 | ||||
-rw-r--r-- | lib/libc/sys/fcntl.2 | 22 | ||||
-rw-r--r-- | lib/libc/sys/flock.2 | 21 | ||||
-rw-r--r-- | lib/libc/sys/fsync.2 | 21 | ||||
-rw-r--r-- | lib/libc/sys/getdirentries.2 | 21 | ||||
-rw-r--r-- | lib/libc/sys/getpeername.2 | 21 | ||||
-rw-r--r-- | lib/libc/sys/getsockname.2 | 21 | ||||
-rw-r--r-- | lib/libc/sys/getsockopt.2 | 42 | ||||
-rw-r--r-- | lib/libc/sys/ioctl.2 | 21 | ||||
-rw-r--r-- | lib/libc/sys/listen.2 | 21 | ||||
-rw-r--r-- | lib/libc/sys/open.2 | 19 | ||||
-rw-r--r-- | lib/libc/sys/read.2 | 48 | ||||
-rw-r--r-- | lib/libc/sys/sendfile.2 | 27 | ||||
-rw-r--r-- | lib/libc/sys/write.2 | 48 |
19 files changed, 0 insertions, 505 deletions
diff --git a/lib/libc/sys/accept.2 b/lib/libc/sys/accept.2 index 736d068..badb2b1 100644 --- a/lib/libc/sys/accept.2 +++ b/lib/libc/sys/accept.2 @@ -132,30 +132,6 @@ by issuing a call providing only the control information, or by calling .Xr setsockopt 2 . -.Sh IMPLEMENTATION NOTES -In the non-threaded library -.Fn accept -is implemented as the -.Va accept -syscall. -.Pp -In the threaded library, the -.Va accept -syscall is assembled to -.Fn _thread_sys_accept -and -.Fn accept -is implemented as a function which locks -.Fa s -for read and write, then calls -.Fn _thread_sys_accept . -If the call to -.Fn _thread_sys_accept -would block, a context switch is performed. -Before returning, -.Fn accept -unlocks -.Fa s . .Sh RETURN VALUES The call returns \-1 on error. If it succeeds, it returns a non-negative integer that is a descriptor for the accepted socket. diff --git a/lib/libc/sys/bind.2 b/lib/libc/sys/bind.2 index 4e99aa8..cda9822 100644 --- a/lib/libc/sys/bind.2 +++ b/lib/libc/sys/bind.2 @@ -68,27 +68,6 @@ Consult the manual entries in section 4 for detailed information. For maximum portability, you should always zero-out the socket structure before populating it, before passing it to .Fn bind . -.Sh IMPLEMENTATION NOTES -In the non-threaded library -.Fn bind -is implemented as the -.Va bind -syscall. -.Pp -In the threaded library, the -.Va bind -syscall is assembled to -.Fn _thread_sys_bind -and -.Fn bind -is implemented as a function which locks -.Fa s -for read and write, then calls -.Fn _thread_sys_bind . -Before returning, -.Fn bind -unlocks -.Fa s . .Sh RETURN VALUES .Rv -std bind .Sh ERRORS diff --git a/lib/libc/sys/close.2 b/lib/libc/sys/close.2 index 9192ae1..6a07191 100644 --- a/lib/libc/sys/close.2 +++ b/lib/libc/sys/close.2 @@ -101,27 +101,6 @@ execve; the call .Dq Li fcntl(d, F_SETFD, 0) restores the default, which is to not close the descriptor. -.Sh IMPLEMENTATION NOTES -In the non-threaded library -.Fn close -is implemented as the -.Va close -syscall. -.Pp -In the threaded library, the -.Va close -syscall is assembled to -.Fn _thread_sys_close -and -.Fn close -is implemented as a function which locks -.Fa d -for read and write, then calls -.Fn _thread_sys_close . -Before returning, -.Fn close -unlocks -.Fa d . .Sh RETURN VALUES .Rv -std close .Sh ERRORS diff --git a/lib/libc/sys/connect.2 b/lib/libc/sys/connect.2 index 975b6c6..c80f03d 100644 --- a/lib/libc/sys/connect.2 +++ b/lib/libc/sys/connect.2 @@ -71,30 +71,6 @@ only once; datagram sockets may use multiple times to change their association. Datagram sockets may dissolve the association by connecting to an invalid address, such as a null address. -.Sh IMPLEMENTATION NOTES -In the non-threaded library -.Fn connect -is implemented as the -.Va connect -syscall. -.Pp -In the threaded library, the -.Va connect -syscall is assembled to -.Fn _thread_sys_connect -and -.Fn connect -is implemented as a function which locks -.Va s -for read and write, then calls -.Fn _thread_sys_connect . -If the call to -.Fn _thread_sys_connect -would block, a context switch is performed. -Before returning, -.Fn connect -unlocks -.Va s . .Sh RETURN VALUES .Rv -std connect .Sh ERRORS diff --git a/lib/libc/sys/dup.2 b/lib/libc/sys/dup.2 index d9a7a3f..2d57eab 100644 --- a/lib/libc/sys/dup.2 +++ b/lib/libc/sys/dup.2 @@ -115,52 +115,6 @@ and is a valid descriptor, then .Fn dup2 is successful, and does nothing. -.Sh IMPLEMENTATION NOTES -In the non-threaded library -.Fn dup -is implemented as the -.Va dup -syscall. -.Pp -In the threaded library, the -.Va dup -syscall is assembled to -.Fn _thread_sys_dup -and -.Fn dup -is implemented as a function which locks -.Fa oldd -for read and write, then calls -.Fn _thread_sys_dup . -Before returning, -.Fn dup -unlocks -.Fa oldd . -.Pp -In the non-threaded library -.Fn dup2 -is implemented as the -.Va dup2 -syscall. -.Pp -In the threaded library, the -.Va dup2 -syscall is assembled to -.Fn _thread_sys_dup2 -and -.Fn dup2 -is implemented as a function which locks both -.Fa oldd -and -.Fa newd -for read and write, then calls -.Fn _thread_sys_dup2 . -Before returning, -.Fn dup2 -unlocks -.Fa oldd . -and -.Fa newd . .Sh RETURN VALUES The value -1 is returned if an error occurs in either call. The external variable diff --git a/lib/libc/sys/execve.2 b/lib/libc/sys/execve.2 index 89c0ecb..56aefcf 100644 --- a/lib/libc/sys/execve.2 +++ b/lib/libc/sys/execve.2 @@ -189,22 +189,6 @@ and .Fa argv points to the array of character pointers to the arguments themselves. -.Sh IMPLEMENTATION NOTES -In the non-threaded library -.Fn execve -is implemented as the -.Va execve -syscall. -.Pp -In the threaded library, the -.Va execve -syscall is assembled to -.Fn _thread_sys_execve -and -.Fn execve -is implemented as a function which performs user-thread -library re-initialization and then calls -.Fn _thread_sys_execve . .Sh RETURN VALUES As the .Fn execve diff --git a/lib/libc/sys/fcntl.2 b/lib/libc/sys/fcntl.2 index f416903..2f70e72 100644 --- a/lib/libc/sys/fcntl.2 +++ b/lib/libc/sys/fcntl.2 @@ -352,28 +352,6 @@ This implementation detects that sleeping until a locked region is unlocked would cause a deadlock and fails with an .Er EDEADLK error. -.Sh IMPLEMENTATION NOTES -In the non-threaded library -.Fn fcntl -is implemented as the -.Va fcntl -syscall. -.Pp -In the threaded library, the -.Va fcntl -syscall is assembled to -.Fn _thread_sys_fcntl -and -.Fn fcntl -is implemented as a function which disables thread rescheduling, locks -.Fa fd -for read and write, then calls -.Fn _thread_sys_fcntl . -Before returning, -.Fn fcntl -unlocks -.Fa fd -and enables thread rescheduling. .Sh RETURN VALUES Upon successful completion, the value returned depends on .Fa cmd diff --git a/lib/libc/sys/flock.2 b/lib/libc/sys/flock.2 index 33dcec5..f76b094 100644 --- a/lib/libc/sys/flock.2 +++ b/lib/libc/sys/flock.2 @@ -112,27 +112,6 @@ forks and the child explicitly unlocks the file, the parent will lose its lock. .Pp Processes blocked awaiting a lock may be awakened by signals. -.Sh IMPLEMENTATION NOTES -In the non-threaded library -.Fn flock -is implemented as the -.Va flock -syscall. -.Pp -In the threaded library, the -.Va flock -syscall is assembled to -.Fn _thread_sys_flock -and -.Fn flock -is implemented as a function which locks -.Fa fd -for read and write, then calls -.Fn _thread_sys_flock . -Before returning, -.Fn flock -unlocks -.Fa fd . .Sh RETURN VALUES .Rv -std flock .Sh ERRORS diff --git a/lib/libc/sys/fsync.2 b/lib/libc/sys/fsync.2 index ac28aef..821b096 100644 --- a/lib/libc/sys/fsync.2 +++ b/lib/libc/sys/fsync.2 @@ -56,27 +56,6 @@ of buffers for the associated file to be written to a disk. should be used by programs that require a file to be in a known state, for example, in building a simple transaction facility. -.Sh IMPLEMENTATION NOTES -In the non-threaded library -.Fn fsync -is implemented as the -.Va fsync -syscall. -.Pp -In the threaded library, the -.Va fsync -syscall is assembled to -.Fn _thread_sys_fsync -and -.Fn fsync -is implemented as a function which locks -.Fa fd -for read and write, then calls -.Fn _thread_sys_fsync . -Before returning, -.Fn fsync -unlocks -.Fa fd . .Sh RETURN VALUES .Rv -std fsync .Sh ERRORS diff --git a/lib/libc/sys/getdirentries.2 b/lib/libc/sys/getdirentries.2 index 769ce32..d5f073c 100644 --- a/lib/libc/sys/getdirentries.2 +++ b/lib/libc/sys/getdirentries.2 @@ -141,27 +141,6 @@ a value returned in the location pointed to by .Pf ( Fn getdirentries only) or zero. -.Sh IMPLEMENTATION NOTES -In the non-threaded library -.Fn getdirentries -is implemented as the -.Va getdirentries -syscall. -.Pp -In the threaded library, the -.Va getdirentries -syscall is assembled to -.Fn _thread_sys_getdirentries -and -.Fn getdirentries -is implemented as a function which locks -.Fa fd -for read and write, then calls -.Fn _thread_sys_getdirentries . -Before returning, -.Fn getdirentries -unlocks -.Fa fd . .Sh RETURN VALUES If successful, the number of bytes actually transferred is returned. Otherwise, -1 is returned and the global variable diff --git a/lib/libc/sys/getpeername.2 b/lib/libc/sys/getpeername.2 index 8aa5625..7454550 100644 --- a/lib/libc/sys/getpeername.2 +++ b/lib/libc/sys/getpeername.2 @@ -58,27 +58,6 @@ the amount of space pointed to by On return it contains the actual size of the name returned (in bytes). The name is truncated if the buffer provided is too small. -.Sh IMPLEMENTATION NOTES -In the non-threaded library -.Fn getpeername -is implemented as the -.Va getpeername -syscall. -.Pp -In the threaded library, the -.Va getpeername -syscall is assembled to -.Fn _thread_sys_getpeername -and -.Fn getpeername -is implemented as a function which locks -.Fa s -for read and write, then calls -.Fn _thread_sys_getpeername . -Before returning, -.Fn getpeername -unlocks -.Fa s . .Sh RETURN VALUES .Rv -std getpeername .Sh ERRORS diff --git a/lib/libc/sys/getsockname.2 b/lib/libc/sys/getsockname.2 index 5d0890d..f4b3060 100644 --- a/lib/libc/sys/getsockname.2 +++ b/lib/libc/sys/getsockname.2 @@ -56,27 +56,6 @@ the amount of space pointed to by .Fa name . On return it contains the actual size of the name returned (in bytes). -.Sh IMPLEMENTATION NOTES -In the non-threaded library -.Fn getsockname -is implemented as the -.Va getsockname -syscall. -.Pp -In the threaded library, the -.Va getsockname -syscall is assembled to -.Fn _thread_sys_getsockname -and -.Fn getsockname -is implemented as a function which locks -.Fa fd -for read and write, then calls -.Fn _thread_sys_getsockname . -Before returning, -.Fn getsockname -unlocks -.Fa fd . .Sh RETURN VALUES .Rv -std getsockname .Sh ERRORS diff --git a/lib/libc/sys/getsockopt.2 b/lib/libc/sys/getsockopt.2 index f570085..d932e1d 100644 --- a/lib/libc/sys/getsockopt.2 +++ b/lib/libc/sys/getsockopt.2 @@ -348,48 +348,6 @@ returns any pending error on the socket and clears the error status. It may be used to check for asynchronous errors on connected datagram sockets or for other asynchronous errors. -.Sh IMPLEMENTATION NOTES -In the non-threaded library -.Fn getsockopt -is implemented as the -.Va getsockopt -syscall. -.Pp -In the threaded library, the -.Va getsockopt -syscall is assembled to -.Fn _thread_sys_getsockopt -and -.Fn getsockopt -is implemented as a function which locks -.Fa s -for read and write, then calls -.Fn _thread_sys_getsockopt . -Before returning, -.Fn getsockopt -unlocks -.Fa s . -.Pp -In the non-threaded library -.Fn setsockopt -is implemented as the -.Va setsockopt -syscall. -.Pp -In the threaded library, the -.Va setsockopt -syscall is assembled to -.Fn _thread_sys_setsockopt -and -.Fn setsockopt -is implemented as a function which locks -.Fa s -for read and write, then calls -.Fn _thread_sys_setsockopt . -Before returning, -.Fn setsockopt -unlocks -.Fa s . .Sh RETURN VALUES .Rv -std .Sh ERRORS diff --git a/lib/libc/sys/ioctl.2 b/lib/libc/sys/ioctl.2 index c16e12e..c5e9a79 100644 --- a/lib/libc/sys/ioctl.2 +++ b/lib/libc/sys/ioctl.2 @@ -85,27 +85,6 @@ Macros and defines used in specifying an ioctl .Fa request are located in the file .Ao Pa sys/ioctl.h Ac . -.Sh IMPLEMENTATION NOTES -In the non-threaded library -.Fn ioctl -is implemented as the -.Va ioctl -syscall. -.Pp -In the threaded library, the -.Va ioctl -syscall is assembled to -.Fn _thread_sys_ioctl -and -.Fn ioctl -is implemented as a function which locks -.Va d -for read and write, then calls -.Fn _thread_sys_ioctl . -Before returning, -.Fn ioctl -unlocks -.Va d . .Sh RETURN VALUES If an error has occurred, a value of -1 is returned and .Va errno diff --git a/lib/libc/sys/listen.2 b/lib/libc/sys/listen.2 index 1a97658..e245ad6 100644 --- a/lib/libc/sys/listen.2 +++ b/lib/libc/sys/listen.2 @@ -85,27 +85,6 @@ or less than zero is specified, .Fa backlog is silently forced to .Va kern.ipc.somaxconn . -.Sh IMPLEMENTATION NOTES -In the non-threaded library -.Fn listen -is implemented as the -.Va listen -syscall. -.Pp -In the threaded library, the -.Va listen -syscall is assembled to -.Fn _thread_sys_listen -and -.Fn listen -is implemented as a function which locks -.Fa s -for read and write, then calls -.Fn _thread_sys_listen . -Before returning, -.Fn listen -unlocks -.Fa s . .Sh RETURN VALUES .Rv -std listen .Sh ERRORS diff --git a/lib/libc/sys/open.2 b/lib/libc/sys/open.2 index 874ce74..2c8070b 100644 --- a/lib/libc/sys/open.2 +++ b/lib/libc/sys/open.2 @@ -182,25 +182,6 @@ The system imposes a limit on the number of file descriptors open simultaneously by one process. .Xr Getdtablesize 2 returns the current system limit. -.Sh IMPLEMENTATION NOTES -In the non-threaded library -.Fn open -is implemented as the -.Va open -syscall. -.Pp -In the threaded library, the -.Va open -syscall is assembled to -.Fn _thread_sys_open -and -.Fn open -is implemented as a function which disables thread rescheduling -and calls -.Fn _thread_sys_open . -Before returning, -.Fn open -enables thread rescheduling. .Sh RETURN VALUES If successful, .Fn open diff --git a/lib/libc/sys/read.2 b/lib/libc/sys/read.2 index e4f330a..42d04ce 100644 --- a/lib/libc/sys/read.2 +++ b/lib/libc/sys/read.2 @@ -116,54 +116,6 @@ return the number of bytes actually read and placed in the buffer. The system guarantees to read the number of bytes requested if the descriptor references a normal file that has that many bytes left before the end-of-file, but in no other case. -.Sh IMPLEMENTATION NOTES -In the non-threaded library -.Fn read -is implemented as the -.Va read -syscall. -.Pp -In the threaded library, the -.Va read -syscall is assembled to -.Fn _thread_sys_read -and -.Fn read -is implemented as a function which locks -.Fa d -for read, then calls -.Fn _thread_sys_read . -If the call to -.Fn _thread_sys_read -would block, a context switch is performed. -Before returning, -.Fn read -unlocks -.Fa d . -.Pp -In the non-threaded library -.Fn readv -is implemented as the -.Va readv -syscall. -.Pp -In the threaded library, the -.Va readv -syscall is assembled to -.Fn _thread_sys_readv -and -.Fn readv -is implemented as a function which locks -.Fa d -for read, then calls -.Fn _thread_sys_readv . -If the call to -.Fn _thread_sys_readv -would block, a context switch is performed. -Before returning, -.Fn readv -unlocks -.Fa d . .Sh RETURN VALUES If successful, the number of bytes actually read is returned. diff --git a/lib/libc/sys/sendfile.2 b/lib/libc/sys/sendfile.2 index f073b06..c2ca529 100644 --- a/lib/libc/sys/sendfile.2 +++ b/lib/libc/sys/sendfile.2 @@ -104,33 +104,6 @@ The implementation of .Fn sendfile is "zero-copy", meaning that it has been optimized so that copying of the file data is avoided. -.Pp -In the non-threaded library -.Fn sendfile -is implemented as the -.Va sendfile -syscall. -.Pp -In the threaded library, the -.Va sendfile -syscall is assembled to -.Fn _thread_sys_sendfile -and -.Fn sendfile -is implemented as a function which locks -.Fa fd -for reading and -.Fa s -for writing, then calls -.Fn _thread_sys_sendfile . -If the call to -.Fn _thread_sys_sendfile -would block, a context switch is performed. Before returning, -.Fn sendfile -unlocks -.Fa fd -and -.Fa s . .Sh RETURN VALUES .Rv -std sendfile .Sh ERRORS diff --git a/lib/libc/sys/write.2 b/lib/libc/sys/write.2 index 77fba35..d8a4177 100644 --- a/lib/libc/sys/write.2 +++ b/lib/libc/sys/write.2 @@ -124,54 +124,6 @@ and may write fewer bytes than requested; the return value must be noted, and the remainder of the operation should be retried when possible. -.Sh IMPLEMENTATION NOTES -In the non-threaded library -.Fn write -is implemented as the -.Va write -syscall. -.Pp -In the threaded library, the -.Va write -syscall is assembled to -.Fn _thread_sys_write -and -.Fn write -is implemented as a function which locks -.Fa d -for read and write, then calls -.Fn _thread_sys_write . -If the call to -.Fn _thread_sys_write -would block, a context switch is performed. -Before returning, -.Fn write -unlocks -.Fa d . -.Pp -In the non-threaded library -.Fn writev -is implemented as the -.Va writev -syscall. -.Pp -In the threaded library, the -.Va writev -syscall is assembled to -.Fn _thread_sys_writev -and -.Fn writev -is implemented as a function which locks -.Fa d -for read and write, then calls -.Fn _thread_sys_writev . -If the call to -.Fn _thread_sys_writev -would block, a context switch is performed. -Before returning, -.Fn writev -unlocks -.Fa d . .Sh RETURN VALUES Upon successful completion the number of bytes which were written is returned. Otherwise a -1 is returned and the global variable |