diff options
Diffstat (limited to 'libpthread/linuxthreads.old/specific.c')
-rw-r--r-- | libpthread/linuxthreads.old/specific.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libpthread/linuxthreads.old/specific.c b/libpthread/linuxthreads.old/specific.c index 509ee6665..72409b30b 100644 --- a/libpthread/linuxthreads.old/specific.c +++ b/libpthread/linuxthreads.old/specific.c @@ -15,7 +15,6 @@ /* Thread-specific data */ #include <features.h> -#define __USE_GNU #include <errno.h> #include <stddef.h> #include <stdlib.h> @@ -43,18 +42,18 @@ int pthread_key_create(pthread_key_t * key, destr_function destr) { int i; - pthread_mutex_lock(&pthread_keys_mutex); + __pthread_mutex_lock(&pthread_keys_mutex); for (i = 0; i < PTHREAD_KEYS_MAX; i++) { if (! pthread_keys[i].in_use) { /* Mark key in use */ pthread_keys[i].in_use = 1; pthread_keys[i].destr = destr; - pthread_mutex_unlock(&pthread_keys_mutex); + __pthread_mutex_unlock(&pthread_keys_mutex); *key = i; return 0; } } - pthread_mutex_unlock(&pthread_keys_mutex); + __pthread_mutex_unlock(&pthread_keys_mutex); return EAGAIN; } @@ -63,9 +62,9 @@ int pthread_key_delete(pthread_key_t key) { pthread_descr self = thread_self(); - pthread_mutex_lock(&pthread_keys_mutex); + __pthread_mutex_lock(&pthread_keys_mutex); if (key >= PTHREAD_KEYS_MAX || !pthread_keys[key].in_use) { - pthread_mutex_unlock(&pthread_keys_mutex); + __pthread_mutex_unlock(&pthread_keys_mutex); return EINVAL; } pthread_keys[key].in_use = 0; @@ -91,7 +90,7 @@ int pthread_key_delete(pthread_key_t key) } while (th != self); } - pthread_mutex_unlock(&pthread_keys_mutex); + __pthread_mutex_unlock(&pthread_keys_mutex); return 0; } |