From 3573157bcf2a6e7bfd412d6eb8944eb04f194dbf Mon Sep 17 00:00:00 2001 From: Peng Haitao Date: Mon, 13 Sep 2010 16:31:09 +0800 Subject: [PATCH] hsearch.3: Add description of the functions' thread-safety The three functions hcreate(), hdestroy() and hsearch() use a global space for storing the table, so they are not thread-safe. Signed-off-by: Peng Haitao --- man3/hsearch.3 | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/man3/hsearch.3 b/man3/hsearch.3 index b392b55..3a448d8 100644 --- a/man3/hsearch.3 +++ b/man3/hsearch.3 @@ -32,7 +32,7 @@ .\" 2008-09-03, mtk, restructured somewhat, in part after suggestions from .\" Timothy S. Nelson .\" -.TH HSEARCH 3 2008-10-06 "GNU" "Linux Programmer's Manual" +.TH HSEARCH 3 2010-09-13 "GNU" "Linux Programmer's Manual" .SH NAME hcreate, hdestroy, hsearch, hcreate_r, hdestroy_r, hsearch_r \- hash table management @@ -232,6 +232,20 @@ was not found in the table. POSIX.1-2001 only specifies the .B ENOMEM error. +.SH "ATTRIBUTES" +The three functions +.BR hcreate (), +.BR hsearch (), +and +.BR hdestroy () +use a global space for storing the table, so they are not thread-safe. +.PP +The three functions +.BR hcreate_r (), +.BR hsearch_r (), +and +.BR hdestroy_r () +are thread-safe. .SH "CONFORMING TO" The functions .BR hcreate (), -- 1.6.0.1