Use __declspec(thread) var rather tha TslAlloc & co.
[p5sagit/p5-mst-13.2.git] / win32 / win32thread.c
index 4dbc750..eefa92c 100644 (file)
@@ -1,6 +1,20 @@
 #include "EXTERN.h"
 #include "perl.h"
 
+__declspec(thread) struct thread *current_thread;
+
+void
+Perl_setTHR(struct thread *t)
+{
+ current_thread = t;
+}
+
+struct thread *
+Perl_getTHR(void)
+{
+ return current_thread;
+}
+
 void
 Perl_alloc_thread_key(void)
 {