From d1eb7a4615a95da05f4bbc2e93e167b8afe6f0dc Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 3 Dec 2003 05:21:55 +0000 Subject: * cygthread.cc (cygthread::stub): Properly establish _threadinfo environment. (cygthread::stub2): New function. (cygthread::simplestub): Ditto. (cygthread::simplestub2): New function. * cygthread.h (cygthread::stub2): Declare new function. (cygthread::simplestub2): Ditto. * cygtls.h (_threadinfo::call): Declare new function. (_threadinfo::call2): Ditto. * dcrt0.cc (dll_crt0_1): Accommodate new _threadinfo::init which doesn't return pointer to tls. (_dll_crt0): Remove obsolete DECLARE_TLS_STORAGE. (dll_crt0): Ditto. * exceptions.cc (_threadinfo::call): New function. (_threadinfo::call2): Ditto. (_threadinfo::init): Don't return pointer. * thread.cc (pthread::thread_init_wrapper): Properly establish _threadinfo environment. (pthread::thread_init_wrapper2): New function. * thread.h (pthread::thread_init_wrapper): Remove noreturn attribute (pthread::thread_init_wrapper2): Declare new function. * winbase.h: Remove obsolete code. --- winsup/cygwin/winbase.h | 45 --------------------------------------------- 1 file changed, 45 deletions(-) (limited to 'winsup/cygwin/winbase.h') diff --git a/winsup/cygwin/winbase.h b/winsup/cygwin/winbase.h index 3cbdb183d..3dbf116ea 100644 --- a/winsup/cygwin/winbase.h +++ b/winsup/cygwin/winbase.h @@ -56,49 +56,4 @@ ilockcmpexch (long *t, long v, long c) #define InterlockedExchange ilockexch #undef InterlockedCompareExchange #define InterlockedCompareExchange ilockcmpexch - -// extern char * volatile *__stackbase __asm__ ("%fs:4"); -#ifndef EXPCGf -#define DECLARE_TLS_STORAGE do {} while (0) -#else -#define DECLARE_TLS_STORAGE char **tls[4096] __attribute__ ((unused)) -extern long tls_ix; - -extern __inline__ DWORD -my_tlsalloc () -{ - DWORD n = ilockdecr (&tls_ix); - __stackbase[tls_ix] = NULL; - return n; -} - -extern __inline__ BOOL -my_tlssetvalue (DWORD ix, void *val) -{ - __stackbase[ix] = (char *) val; - return 1; -} - -extern __inline__ void * -my_tlsgetvalue (DWORD ix) -{ - return __stackbase[ix]; -} - -extern __inline__ BOOL -my_tlsfree (DWORD ix) -{ - /* nothing for now */ - return 1; -} - -#undef TlsAlloc -#define TlsAlloc my_tlsalloc -#undef TlsGetValue -#define TlsGetValue my_tlsgetvalue -#undef TlsSetValue -#define TlsSetValue my_tlssetvalue -#undef TlsFree -#define TlsFree my_tlsfree -#endif /*EXPCGF*/ #endif /*_WINBASE2_H*/ -- cgit v1.2.3