From f36956581759863bfd4e05c77c234e512834ebd4 Mon Sep 17 00:00:00 2001 From: deischen Date: Tue, 19 Mar 2002 22:58:56 +0000 Subject: Add the ability to recognize old references to keys, and return NULL when old keys are referenced (after pthread_key_delete()) via pthread_getspecific(). --- lib/libpthread/thread/thr_private.h | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'lib/libpthread/thread/thr_private.h') diff --git a/lib/libpthread/thread/thr_private.h b/lib/libpthread/thread/thr_private.h index f49814b..ec15c3a 100644 --- a/lib/libpthread/thread/thr_private.h +++ b/lib/libpthread/thread/thr_private.h @@ -481,13 +481,6 @@ enum pthread_susp { } while (tv.tv_sec != _sched_tod.tv_sec) -struct pthread_key { - spinlock_t lock; - volatile int allocated; - volatile int count; - void (*destructor) (); -}; - struct pthread_rwlockattr { int pshared; }; @@ -631,6 +624,11 @@ struct pthread_signal_frame { siginfo_t siginfo; }; +struct pthread_specific_elem { + const void *data; + int seqno; +}; + /* * Thread structure. */ @@ -842,9 +840,9 @@ struct pthread { */ TAILQ_HEAD(, pthread_mutex) mutexq; - void *ret; - const void **specific_data; - int specific_data_count; + void *ret; + struct pthread_specific_elem *specific; + int specific_data_count; /* Cleanup handlers Link List */ struct pthread_cleanup *cleanup; -- cgit v1.1