From e5315a56df63d53c7635d36f2f3026aed9378b9e Mon Sep 17 00:00:00 2001 From: Patrick Kelsey Date: Thu, 28 May 2015 16:18:41 +0000 Subject: [PATCH] Provide an unambiguous description of the potential hazard in calling pthread_setspecific(3) from a key destructor. Reviewed by: jhb Approved by: jmallett (mentor) MFC after: 3 days --- share/man/man3/pthread_setspecific.3 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/share/man/man3/pthread_setspecific.3 b/share/man/man3/pthread_setspecific.3 index 1ea3002d43a0..3153c991f90b 100644 --- a/share/man/man3/pthread_setspecific.3 +++ b/share/man/man3/pthread_setspecific.3 @@ -67,7 +67,10 @@ is undefined. The .Fn pthread_setspecific function may be called from a thread-specific data destructor function, -however this may result in lost storage or infinite loops. +however this may result in lost storage or infinite loops if doing so +causes non-NULL key values to remain after +.Bq PTHREAD_DESTRUCTOR_ITERATIONS +iterations of destructor calls have been made. .Sh RETURN VALUES If successful, the .Fn pthread_setspecific