diff options
author | David Young <dyoung@hdfgroup.org> | 2020-02-10 23:24:04 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-02-10 23:24:04 (GMT) |
commit | 63c95faf49559ea66e3066427961095b69fdb213 (patch) | |
tree | fe0d333e1ab8bd344721b00631dd76510207c775 /src | |
parent | 3109f9e32378087d73fe9b0cd956e41efa1ca6cd (diff) | |
download | hdf5-63c95faf49559ea66e3066427961095b69fdb213.zip hdf5-63c95faf49559ea66e3066427961095b69fdb213.tar.gz hdf5-63c95faf49559ea66e3066427961095b69fdb213.tar.bz2 |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/H5TS.c | 21 |
1 files changed, 0 insertions, 21 deletions
@@ -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 |