From e0cb3da9bad150b424848b993bb100766d07ded7 Mon Sep 17 00:00:00 2001 From: rpj Date: Thu, 22 Oct 1998 04:50:01 +0000 Subject: Thu Oct 22 21:44:44 1998 Ross Johnson * tsd.c: Add description of pthread_key_delete() from the standard as a comment. --- tsd.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'tsd.c') diff --git a/tsd.c b/tsd.c index 8aa1341..d700136 100644 --- a/tsd.c +++ b/tsd.c @@ -122,6 +122,29 @@ pthread_getspecific(pthread_key_t key) return keys[key]; } +/* + pthread_key_delete: + + ANSI/IEEE Std 1003.1, 1996 Edition + + Section 17.1.3.2 + + This function deletes a thread-specific data key previously returned by + pthread_key_create(). The thread specific data values associated with + "key" need not be NULL at the time pthread_key_delete() is called. It is + the responsibility of the application to free any application storage + or perform any cleanup actions for data structures related to the deleted + key or associated thread-specific data in any threads; this cleanup + can be done either before or after pthread_key_delete() is called. Any + attempt to use "key" following the call to pthread_key_delete() + results in undefined behaviour. + + The pthread_key_delete() function shall be callable from within + destructor functions. No destructor functions shall be invoked by + pthread_key_delete(). Any destructor function that may have been associated + with "key" shall no longer be called upon thread exit. + */ + int pthread_key_delete(pthread_key_t key) { @@ -145,3 +168,4 @@ pthread_key_delete(pthread_key_t key) return ret; } + -- cgit v1.2.3