From 424ca52423ca124e4618e0e7a0dba22ea989ef09 Mon Sep 17 00:00:00 2001 From: rpj Date: Wed, 14 Oct 1998 19:51:06 +0000 Subject: Thu Oct 15 11:53:21 1998 Ross Johnson * global.c (_pthread_tsd_key_table): Fix declaration. * implement.h(_pthread_TSD_keys_TlsIndex): Add missing extern. (_pthread_tsd_mutex): Ditto. * create.c (_pthread_start_call): Fix "keys" array declaration. Add comment. * tsd.c (pthread_setspecific): Fix type declaration and cast. (pthread_getspecific): Ditto. * cleanup.c (_pthread_destructor_run_all): Declare missing loop counter. --- implement.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'implement.h') diff --git a/implement.h b/implement.h index a87edb2..135fc18 100644 --- a/implement.h +++ b/implement.h @@ -9,6 +9,7 @@ /* Use internally to initialise const ints and thread admin array sizes. */ #define _PTHREAD_MAX_THREADS 128 +#define _PTHREAD_MAX_KEYS 128 #define _PTHREAD_HASH_INDEX(x) (((ULONG) x) % PTHREAD_THREADS_MAX) @@ -142,6 +143,8 @@ void _pthread_exit(pthread_t thread, void * value, int return_code); extern DWORD _pthread_threadID_TlsIndex; +extern DWORD _pthread_TSD_keys_TlsIndex; + /* Global data declared in global.c */ @@ -171,8 +174,10 @@ extern pthread_mutex_t _pthread_threads_mutex_table[]; /* Global TSD key array. */ extern _pthread_tsd_key_t _pthread_tsd_key_table[]; -#endif /* _IMPLEMENT_H */ - - +/* Mutex lock for TSD operations */ +extern pthread_mutex_t _pthread_tsd_mutex; +/* Index to the next available TSD key. */ +extern int _pthread_tsd_key_next; +#endif /* _IMPLEMENT_H */ -- cgit v1.2.3