diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-04-14 23:49:40 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-04-14 23:49:40 +0000 |
commit | ea48e2c4cc0b0a5e09e9407c9309d4a85926e8b7 (patch) | |
tree | 56f88f516b741d852200b86b6c2dc9ecb785dd6a /linuxthreads/specific.c | |
parent | 613ae2c8ee6e332a6963d9960518d36e8cc312c3 (diff) | |
download | glibc-ea48e2c4cc0b0a5e09e9407c9309d4a85926e8b7.tar.gz glibc-ea48e2c4cc0b0a5e09e9407c9309d4a85926e8b7.tar.xz glibc-ea48e2c4cc0b0a5e09e9407c9309d4a85926e8b7.zip |
Update.
1999-04-14 Andreas Jaeger <aj@arthur.rhein-neckar.de> * wctype/test_wcfuncs.c: New file, tests towlower and towupper. * wctype/Makefile (tests): Add test_wcfuncs.
Diffstat (limited to 'linuxthreads/specific.c')
-rw-r--r-- | linuxthreads/specific.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/linuxthreads/specific.c b/linuxthreads/specific.c index 674353dd39..1dafecc2e8 100644 --- a/linuxthreads/specific.c +++ b/linuxthreads/specific.c @@ -73,14 +73,15 @@ int pthread_key_delete(pthread_key_t key) } pthread_keys[key].in_use = 0; pthread_keys[key].destr = NULL; - /* Set the value of the key to NULL in all running threads, so that - if the key is reallocated later by pthread_key_create, its + /* Set the value of the key to NULL in all running threads, so + that if the key is reallocated later by pthread_key_create, its associated values will be NULL in all threads. */ idx1st = key / PTHREAD_KEY_2NDLEVEL_SIZE; idx2nd = key % PTHREAD_KEY_2NDLEVEL_SIZE; th = self; do { - if (th->p_specific[idx1st] != NULL) + /* If the thread already is terminated don't modify the memory. */ + if (!th->p_terminated && th->p_specific[idx1st] != NULL) th->p_specific[idx1st][idx2nd] = NULL; th = th->p_nextlive; } while (th != self); |