4 #ifdef USE_DECLSPEC_THREAD
5 __declspec(thread) void *PL_current_context = NULL;
9 Perl_set_context(void *t)
11 #if defined(USE_ITHREADS)
12 # ifdef USE_DECLSPEC_THREAD
13 Perl_current_context = t;
15 DWORD err = GetLastError();
16 TlsSetValue(PL_thr_key,t);
23 Perl_get_context(void)
25 #if defined(USE_ITHREADS)
26 # ifdef USE_DECLSPEC_THREAD
27 return Perl_current_context;
29 DWORD err = GetLastError();
30 void *result = TlsGetValue(PL_thr_key);