From 94cfb27da3941eea2b20867eacc09a5b91168438 Mon Sep 17 00:00:00 2001 From: rpj Date: Thu, 30 Jul 1998 13:51:57 +0000 Subject: Thu Jul 30 23:12:45 1998 Ross Johnson * implement.h: Remove _pthread_find_entry() prototype. * private.c: Extend comments. Remove _pthread_find_entry() - no longer needed. * create.c (_pthread_start_call): Add call to TlsSetValue() to store the thread ID. * dll.c (PthreadsEntryPoint): Implement. This is called whenever a process loads the DLL. Used to initialise thread local storage. * implement.h: Add _pthread_threadID_TlsIndex. Add ()s around _PTHREAD_VALID expression. * misc.c (pthread_self): Re-implement using Win32 TLS to store the threads own ID. --- implement.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'implement.h') diff --git a/implement.h b/implement.h index 5ee9ba3..ba8db6e 100644 --- a/implement.h +++ b/implement.h @@ -17,9 +17,9 @@ enum { }; #define _PTHREAD_VALID(T) \ - (T) != NULL \ - && ((T)->ptstatus == _PTHREAD_NEW - || (T)->ptstatus == _PTHREAD_INUSE) + ((T) != NULL \ + && ((T)->ptstatus == _PTHREAD_NEW + || (T)->ptstatus == _PTHREAD_INUSE)) /* Handler execution flags. */ #define _PTHREAD_HANDLER_NOEXECUTE 0 @@ -114,8 +114,6 @@ void _pthread_handler_pop_all(int stack, int _pthread_new_thread(pthread_t * thread); -pthread_t _pthread_find_thread(HANDLE win32handle); - int _pthread_delete_thread(pthread_t thread); /* Thread cleanup. */ @@ -129,6 +127,11 @@ void _pthread_exit(pthread_t thread, void * value, int return_code); #endif /* __cplusplus */ +/* Global declared dll.c */ + +extern DWORD _pthread_threadID_TlsIndex; + + /* Global data declared in global.c */ extern pthread_mutex_t _pthread_table_mutex; -- cgit v1.2.3