summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys/getsockopt.2
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1996-01-22 00:02:33 +0000
committerjulian <julian@FreeBSD.org>1996-01-22 00:02:33 +0000
commit619b731f5bb5e09dcf1eaf1fbd96383ca64398fd (patch)
treea89c7f50ec371cef4418259b9dccdd31ebb2f61f /lib/libc/sys/getsockopt.2
parent663b14fb2f3198fb0bfb62ae16b6b56c2a4dd055 (diff)
downloadFreeBSD-src-619b731f5bb5e09dcf1eaf1fbd96383ca64398fd.zip
FreeBSD-src-619b731f5bb5e09dcf1eaf1fbd96383ca64398fd.tar.gz
Reviewed by: julian and (hsu?)
Submitted by: John Birrel(L?) changes for threadsafe operations
Diffstat (limited to 'lib/libc/sys/getsockopt.2')
-rw-r--r--lib/libc/sys/getsockopt.245
1 files changed, 44 insertions, 1 deletions
diff --git a/lib/libc/sys/getsockopt.2 b/lib/libc/sys/getsockopt.2
index 24ae2b8b..e2ec257 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
OpenPOWER on IntegriCloud