[PATCH v2] bindresvport.3: ATTRIBUTES: Note function that is thread-safe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Before glibc 2.17, bindresvport() is not thread-safe.
Since glibc 2.17, it is thread-safe, the patch can refer to URL:
http://sourceware.org/git/?p=glibc.git;a=commit;h=f6da27e53695ad1cc0e2a9490358decbbfdff5e5

Signed-off-by: Peng Haitao <penght@xxxxxxxxxxxxxx>
---
 man3/bindresvport.3 | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/man3/bindresvport.3 b/man3/bindresvport.3
index d2e73a4..2c7152d 100644
--- a/man3/bindresvport.3
+++ b/man3/bindresvport.3
@@ -89,6 +89,16 @@ is not NULL and
 .I sin->sin_family
 is not
 .BR AF_INET .
+.SH ATTRIBUTES
+.SS Multithreading (see pthreads(7))
+Before glibc 2.17, the
+.BR bindresvport ()
+uses a static variable that is not protected, so it is not thread-safe.
+
+Since glibc 2.17, the
+.BR bindresvport ()
+uses a lock to protect static variable, so it is thread-safe.
+.\" Modified in commit f6da27e53695ad1cc0e2a9490358decbbfdff5e5
 .SH CONFORMING TO
 Not in POSIX.1-2001.
 Present on the BSDs, Solaris, and many other systems.
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux