#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)
{
}
void
-Perl_set_thread_self(struct thread *thr)
+Perl_set_thread_self(struct perl_thread *thr)
{
#ifdef USE_THREADS
- /* GetCurrentThread() retrurns a pseudo handle, need
- this to convert it into a handle another thread can use
+ /* Set thr->self. GetCurrentThread() retrurns a pseudo handle, need
+ this to convert it into a handle another thread can use.
*/
DuplicateHandle(GetCurrentProcess(),
GetCurrentThread(),
#ifdef USE_THREADS
int
-Perl_thread_create(struct thread *thr, thread_func_t *fn)
+Perl_thread_create(struct perl_thread *thr, thread_func_t *fn)
{
DWORD junk;