diff options
author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-02-23 03:00:03 +0000 |
---|---|---|
committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-02-23 03:00:03 +0000 |
commit | cec88156d8107b78c22b988de72e8c1002118d70 (patch) | |
tree | 07788f53223bc1bdc0383468cf9303a3e0b6637b /libpthread/linuxthreads.old/specific.c | |
parent | 0f2c86bee22bc756814129b430b0687c7e23df81 (diff) | |
download | uClibc-alpine-cec88156d8107b78c22b988de72e8c1002118d70.tar.bz2 uClibc-alpine-cec88156d8107b78c22b988de72e8c1002118d70.tar.xz |
Merge from trunk.
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; } |