summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-02-10 23:24:04 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-05-20 14:31:57 (GMT)
commit8040d73fbe2d9839e2bbacb0aba9b91244c37581 (patch)
tree662862e0c6816b4eddeca676c38590a8f60ab760 /src
parent8ae25d32b073f06bfaf21a5ad72058169f0f1206 (diff)
downloadhdf5-8040d73fbe2d9839e2bbacb0aba9b91244c37581.zip
hdf5-8040d73fbe2d9839e2bbacb0aba9b91244c37581.tar.gz
hdf5-8040d73fbe2d9839e2bbacb0aba9b91244c37581.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.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/H5TS.c b/src/H5TS.c
index b67391c..98eba41 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