From f70177e76e605ec6e6cd5b938fa77ade5d380e87 Mon Sep 17 00:00:00 2001 From: Julian Elischer Date: Mon, 22 Jan 1996 00:02:33 +0000 Subject: Reviewed by: julian and (hsu?) Submitted by: John Birrel(L?) changes for threadsafe operations --- lib/libc/sys/bind.2 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'lib/libc/sys/bind.2') diff --git a/lib/libc/sys/bind.2 b/lib/libc/sys/bind.2 index 18512e29e5c9..f98631d7939b 100644 --- a/lib/libc/sys/bind.2 +++ b/lib/libc/sys/bind.2 @@ -62,6 +62,28 @@ needed (using .Pp The rules used in name binding vary between communication domains. Consult the manual entries in section 4 for detailed information. +.Sh IMPLEMENTATION NOTES +.Pp +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 +.Va s +for read and write, then calls +.Fn _thread_sys_bind . +Before returning, +.Fn bind +unlocks +.Va s . .Sh RETURN VALUES If the bind is successful, a 0 value is returned. A return value of -1 indicates an error, which is -- cgit v1.3