diff options
author | David Young <dyoung@hdfgroup.org> | 2020-02-10 23:24:04 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-05-11 15:22:24 (GMT) |
commit | c97981da3620cff7f789516dd9dff5ffde86d6d8 (patch) | |
tree | 18bb76ffa9733e713fbc028f2a9cb6cc08c6d760 /src | |
parent | d64afcd9d0ea3be06bb4fefd2d4c1ebd291fef84 (diff) | |
download | hdf5-c97981da3620cff7f789516dd9dff5ffde86d6d8.zip hdf5-c97981da3620cff7f789516dd9dff5ffde86d6d8.tar.gz hdf5-c97981da3620cff7f789516dd9dff5ffde86d6d8.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 |