diff options
| author | Roland McGrath <roland@gnu.org> | 2005-02-16 12:31:10 +0000 |
|---|---|---|
| committer | Roland McGrath <roland@gnu.org> | 2005-02-16 12:31:10 +0000 |
| commit | 833861be818bb5d45ab0c47370b84068dfb2fedf (patch) | |
| tree | 2f1754a415c378f6b067f9158cc42df24d4641d2 /linuxthreads/specific.c | |
| parent | c397a0064061e28a00eea873669e59f3983db791 (diff) | |
| download | glibc-833861be818bb5d45ab0c47370b84068dfb2fedf.tar.xz glibc-833861be818bb5d45ab0c47370b84068dfb2fedf.zip | |
import later fedora-branch tweaks
Diffstat (limited to 'linuxthreads/specific.c')
| -rw-r--r-- | linuxthreads/specific.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/linuxthreads/specific.c b/linuxthreads/specific.c index 92eec3d99a..f54fabaeb9 100644 --- a/linuxthreads/specific.c +++ b/linuxthreads/specific.c @@ -104,16 +104,15 @@ int pthread_key_delete(pthread_key_t key) that if the key is reallocated later by pthread_key_create, its associated values will be NULL in all threads. - If no threads have been created yet, clear it just in the - current thread. */ + Do nothing if no threads have been created yet. */ - struct pthread_key_delete_helper_args args; - args.idx1st = key / PTHREAD_KEY_2NDLEVEL_SIZE; - args.idx2nd = key % PTHREAD_KEY_2NDLEVEL_SIZE; if (__pthread_manager_request != -1) { + struct pthread_key_delete_helper_args args; struct pthread_request request; + args.idx1st = key / PTHREAD_KEY_2NDLEVEL_SIZE; + args.idx2nd = key % PTHREAD_KEY_2NDLEVEL_SIZE; args.self = 0; request.req_thread = self; @@ -125,11 +124,6 @@ int pthread_key_delete(pthread_key_t key) (char *) &request, sizeof(request))); suspend(self); } - else - { - if (self->p_specific[args.idx1st] != NULL) - self->p_specific[args.idx1st][args.idx2nd] = NULL; - } pthread_mutex_unlock(&pthread_keys_mutex); return 0; |
