Integrate from ansi branch to mainline.
[p5sagit/p5-mst-13.2.git] / win32 / win32thread.c
index 922bef4..3e63327 100644 (file)
@@ -1,6 +1,20 @@
 #include "EXTERN.h"
 #include "perl.h"
 
+__declspec(thread) struct thread *Perl_current_thread = NULL;
+
+void
+Perl_setTHR(struct thread *t)
+{
+ Perl_current_thread = t;
+}
+
+struct thread *
+Perl_getTHR(void)
+{
+ return Perl_current_thread;
+}
+
 void
 Perl_alloc_thread_key(void)
 {