diff options
Diffstat (limited to 'lib/libc/sys/getsockopt.2')
| -rw-r--r-- | lib/libc/sys/getsockopt.2 | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/lib/libc/sys/getsockopt.2 b/lib/libc/sys/getsockopt.2 index 24ae2b8b4660b..e2ec25751e957 100644 --- a/lib/libc/sys/getsockopt.2 +++ b/lib/libc/sys/getsockopt.2 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)getsockopt.2 8.3 (Berkeley) 4/19/94 -.\" $Id$ +.\" $Id: getsockopt.2,v 1.2 1995/11/03 18:34:36 wollman Exp $ .\" .Dd November 3, 1995 .Dt GETSOCKOPT 2 @@ -313,6 +313,49 @@ 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 +.Pp +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 +.Va s +for read and write, then calls +.Fn _thread_sys_getsockopt . +Before returning, +.Fn getsockopt +unlocks +.Va 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 +.Va s +for read and write, then calls +.Fn _thread_sys_setsockopt . +Before returning, +.Fn setsockopt +unlocks +.Va s . .Sh RETURN VALUES A 0 is returned if the call succeeds, -1 if it fails. .Sh ERRORS |
