OSDN Git Service

(split) LDP: Update original to LDP v3.52.
[linuxjm/LDP_man-pages.git] / original / man3 / hsearch.3
index e66c840..0b639ce 100644 (file)
@@ -32,7 +32,7 @@
 .\" 2008-09-03, mtk, restructured somewhat, in part after suggestions from
 .\"     Timothy S. Nelson <wayland@wayland.id.au>
 .\"
-.TH HSEARCH 3 2011-09-10 "GNU" "Linux Programmer's Manual"
+.TH HSEARCH 3 2013-04-19 "GNU" "Linux Programmer's Manual"
 .SH NAME
 hcreate, hdestroy, hsearch, hcreate_r, hdestroy_r,
 hsearch_r \- hash table management
@@ -176,7 +176,9 @@ rather than as the function result.
 and
 .BR hcreate_r ()
 return nonzero on success.
-They return 0 on error.
+They return 0 on error, with
+.I errno
+set to indicate the cause of the error.
 
 On success,
 .BR hsearch ()
@@ -188,6 +190,9 @@ the hash table is full, or \fIaction\fP is \fBFIND\fP and \fIitem\fP
 cannot be found in the hash table.
 .BR hsearch_r ()
 returns nonzero on success, and 0 on error.
+In the event of an error, these two functions set
+.I errno
+to indicate the cause of the error.
 .SH ERRORS
 .LP
 .BR hcreate_r ()
@@ -223,6 +228,21 @@ was not found in the table.
 POSIX.1-2001 specifies only the
 .B ENOMEM
 error.
+.SH ATTRIBUTES
+.SS Multithreading (see pthreads(7))
+The functions
+.BR hcreate (),
+.BR hsearch (),
+and
+.BR hdestroy ()
+use a global space for storing the table, so they are not thread-safe.
+.LP
+The functions
+.BR hcreate_r (),
+.BR hsearch_r (),
+and
+.BR hdestroy_r ()
+are thread-safe.
 .SH CONFORMING TO
 The functions
 .BR hcreate (),