#include #include #include #include #include "thread_internal.h" extern struct _pthread_fastlock __thread_keys_lock; extern struct _thread_key __thread_keys[PTHREAD_KEYS_MAX]; int pthread_key_create(pthread_key_t *key, void (*destructor)(const void*)) { int ret=-1,i; __THREAD_INIT(); __NO_ASYNC_CANCEL_BEGIN; __pthread_lock(&__thread_keys_lock); for (i=0; i