From: Nick Ing-Simmons Date: Wed, 26 Nov 1997 01:33:32 +0000 (+0000) Subject: Fixup _55 for Win32: X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=61c8b47908b7351a4a26db1cad96af343512550d;p=p5sagit%2Fp5-mst-13.2.git Fixup _55 for Win32: Missed thread :-> perl_thread changes Two #define THR (not the same) K&R style func in hv.c p4raw-id: //depot/ansiperl@309 --- diff --git a/hv.c b/hv.c index e495e91..c68b09d 100644 --- a/hv.c +++ b/hv.c @@ -217,10 +217,7 @@ hv_fetch_ent(HV *hv, SV *keysv, I32 lval, register U32 hash) } static void -hv_magic_check (hv, needs_copy, needs_store) -HV *hv; -bool *needs_copy; -bool *needs_store; +hv_magic_check (HV *hv, bool *needs_copy, bool *needs_store) { MAGIC *mg = SvMAGIC(hv); *needs_copy = FALSE; @@ -1089,3 +1086,4 @@ share_hek(char *str, I32 len, register U32 hash) } + diff --git a/win32/win32thread.c b/win32/win32thread.c index 3e63327..039f8b4 100644 --- a/win32/win32thread.c +++ b/win32/win32thread.c @@ -1,15 +1,15 @@ #include "EXTERN.h" #include "perl.h" -__declspec(thread) struct thread *Perl_current_thread = NULL; +__declspec(thread) struct perl_thread *Perl_current_thread = NULL; void -Perl_setTHR(struct thread *t) +Perl_setTHR(struct perl_thread *t) { Perl_current_thread = t; } -struct thread * +struct perl_thread * Perl_getTHR(void) { return Perl_current_thread; diff --git a/win32/win32thread.h b/win32/win32thread.h index 0d92ffc..f8fbd20 100644 --- a/win32/win32thread.h +++ b/win32/win32thread.h @@ -97,7 +97,6 @@ typedef HANDLE perl_mutex; } \ } STMT_END -#define THR ((struct perl_thread *) TlsGetValue(thr_key)) #define THREAD_CREATE(t, f) Perl_thread_create(t, f) #define THREAD_POST_CREATE(t) NOOP #define THREAD_RET_TYPE DWORD WINAPI @@ -109,7 +108,7 @@ 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; +extern __declspec(thread) struct perl_thread *Perl_current_thread; #define SET_THR(t) (Perl_current_thread = t) #define THR Perl_current_thread #else