X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=win32%2Fwin32thread.h;h=6f355f09ebba7d21f72ede2548d1ad350d73bbb6;hb=c69f112c145fabe210a7e2c5c2406baeea71af2f;hp=38e66e9fc9b39b7d0b5ec09ec82bb15828770314;hpb=a868473fb9213692497e27ae968094b32a41c501;p=p5sagit%2Fp5-mst-13.2.git diff --git a/win32/win32thread.h b/win32/win32thread.h index 38e66e9..6f355f0 100644 --- a/win32/win32thread.h +++ b/win32/win32thread.h @@ -2,7 +2,7 @@ #define _WIN32THREAD_H typedef struct win32_cond { LONG waiters; HANDLE sem; } perl_cond; typedef DWORD perl_key; -typedef HANDLE perl_thread; +typedef HANDLE perl_os_thread; #ifndef DONT_USE_CRITICAL_SECTION @@ -108,25 +108,26 @@ typedef THREAD_RET_TYPE thread_func_t(void *); START_EXTERN_C -#if defined(PERLDLL) && (!defined(__BORLANDC__) || defined(_DLL)) -extern __declspec(thread) struct thread *Perl_current_thread; +#if defined(PERLDLL) && defined(USE_DECLSPEC_THREAD) && (!defined(__BORLANDC__) || defined(_DLL)) +extern __declspec(thread) struct perl_thread *Perl_current_thread; #define SET_THR(t) (Perl_current_thread = t) #define THR Perl_current_thread #else #define THR Perl_getTHR() #define SET_THR(t) Perl_setTHR(t) #endif +struct perl_thread; void Perl_alloc_thread_key _((void)); -int Perl_thread_create _((struct thread *thr, thread_func_t *fn)); -void Perl_set_thread_self _((struct thread *thr)); -struct thread *Perl_getTHR _((void)); -void Perl_setTHR _((struct thread *t)); +int Perl_thread_create _((struct perl_thread *thr, thread_func_t *fn)); +void Perl_set_thread_self _((struct perl_thread *thr)); +struct perl_thread *Perl_getTHR _((void)); +void Perl_setTHR _((struct perl_thread *t)); END_EXTERN_C #define INIT_THREADS NOOP -#define ALLOC_THREAD_KEY NOOP +#define ALLOC_THREAD_KEY Perl_alloc_thread_key() #define SET_THREAD_SELF(thr) Perl_set_thread_self(thr) #define JOIN(t, avp) \