From 63c95faf49559ea66e3066427961095b69fdb213 Mon Sep 17 00:00:00 2001 From: David Young Date: Mon, 10 Feb 2020 17:24:04 -0600 Subject: Remove tongue-in-cheek credit for Rusty Shackleford and Dale Alvin Gribble. Delete the comment questioning whether pthread_mutex_lock is allowed in a key destructor, since pthread_key_create(3) provides the answer: There is no notion of a destructor-safe function. If an application does not call pthread_exit() from a signal handler, or if it blocks any signal whose handler may call pthread_exit() while calling async-unsafe functions, all functions may be safely called from destructors. Delete redundant comment. --- src/H5TS.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/H5TS.c b/src/H5TS.c index a3b7a14..dd6a850 100644 --- a/src/H5TS.c +++ b/src/H5TS.c @@ -105,9 +105,6 @@ H5TS_key_destructor(void *key_val) * DESCRIPTION * When a thread shuts down, put its ID record on the free list. * - * PROGRAMMER: Rusty Shackleford - * February 7, 2020 - * *-------------------------------------------------------------------------- */ static void @@ -118,7 +115,6 @@ H5TS_tid_destructor(void *_v) if (tid == NULL) return; - /* XXX I can use mutexes in destructors, right? */ /* TBD use an atomic CAS */ pthread_mutex_lock(&H5TS_tid_mtx); tid->next = H5TS_tid_next_free; @@ -138,9 +134,6 @@ H5TS_tid_destructor(void *_v) * DESCRIPTION * Initialize for integer thread identifiers. * - * PROGRAMMER: Dale Alvin Gribble - * February 7, 2020 - * *-------------------------------------------------------------------------- */ static void @@ -150,17 +143,6 @@ H5TS_tid_init(void) pthread_key_create(&H5TS_tid_key, H5TS_tid_destructor); } -/* Return an integer identifier, ID, for the current thread satisfying the - * following properties: - * - * 1 1 <= ID <= UINT64_MAX - * 2 ID is constant over the thread's lifetime. - * 3 No two threads share an ID during their lifetimes. - * 4 A thread's ID is available for reuse as soon as it is joined. - * - * ID 0 is reserved. H5TS_thread_id() returns 0 if the library was not built - * with thread safety or if an error prevents it from assigning an ID. - */ /*-------------------------------------------------------------------------- * NAME * H5TS_thread_id @@ -183,9 +165,6 @@ H5TS_tid_init(void) * built with thread safety or if an error prevents it from assigning an * ID. * - * PROGRAMMER: Rusty Shackleford - * February 7, 2020 - * *-------------------------------------------------------------------------- */ uint64_t -- cgit v0.12