diff options
author | deischen <deischen@FreeBSD.org> | 2002-03-19 22:58:56 +0000 |
---|---|---|
committer | deischen <deischen@FreeBSD.org> | 2002-03-19 22:58:56 +0000 |
commit | f36956581759863bfd4e05c77c234e512834ebd4 (patch) | |
tree | 64a520af93e4e04f24e730bf2a51ce6ccb8ad724 /lib/libc_r/uthread/pthread_private.h | |
parent | c8ef9d9122863cc158177add839c76b14d92aa66 (diff) | |
download | FreeBSD-src-f36956581759863bfd4e05c77c234e512834ebd4.zip FreeBSD-src-f36956581759863bfd4e05c77c234e512834ebd4.tar.gz |
Add the ability to recognize old references to keys, and return NULL
when old keys are referenced (after pthread_key_delete()) via
pthread_getspecific().
Diffstat (limited to 'lib/libc_r/uthread/pthread_private.h')
-rw-r--r-- | lib/libc_r/uthread/pthread_private.h | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/libc_r/uthread/pthread_private.h b/lib/libc_r/uthread/pthread_private.h index f49814b..ec15c3a 100644 --- a/lib/libc_r/uthread/pthread_private.h +++ b/lib/libc_r/uthread/pthread_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; |