From c359f976b44cc388e748b77277707536e2732d9d Mon Sep 17 00:00:00 2001 From: John Birrell Date: Sat, 6 Jun 1998 07:20:23 +0000 Subject: [PATCH] Re-design the thread specific key structure. --- lib/libc_r/uthread/pthread_private.h | 5 ++--- lib/libkse/thread/thr_private.h | 5 ++--- lib/libpthread/thread/thr_private.h | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/lib/libc_r/uthread/pthread_private.h b/lib/libc_r/uthread/pthread_private.h index 5f0f3a8fd3b..f1a571007bc 100644 --- a/lib/libc_r/uthread/pthread_private.h +++ b/lib/libc_r/uthread/pthread_private.h @@ -217,9 +217,8 @@ struct pthread_attr { #define TIMESLICE_USEC 100000 struct pthread_key { - pthread_mutex_t mutex; - long access_lock; - long count; + volatile long access_lock; + volatile int allocated; void (*destructor) (); }; diff --git a/lib/libkse/thread/thr_private.h b/lib/libkse/thread/thr_private.h index 5f0f3a8fd3b..f1a571007bc 100644 --- a/lib/libkse/thread/thr_private.h +++ b/lib/libkse/thread/thr_private.h @@ -217,9 +217,8 @@ struct pthread_attr { #define TIMESLICE_USEC 100000 struct pthread_key { - pthread_mutex_t mutex; - long access_lock; - long count; + volatile long access_lock; + volatile int allocated; void (*destructor) (); }; diff --git a/lib/libpthread/thread/thr_private.h b/lib/libpthread/thread/thr_private.h index 5f0f3a8fd3b..f1a571007bc 100644 --- a/lib/libpthread/thread/thr_private.h +++ b/lib/libpthread/thread/thr_private.h @@ -217,9 +217,8 @@ struct pthread_attr { #define TIMESLICE_USEC 100000 struct pthread_key { - pthread_mutex_t mutex; - long access_lock; - long count; + volatile long access_lock; + volatile int allocated; void (*destructor) (); };