summaryrefslogtreecommitdiff
path: root/win32/win32thread.h
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>1997-11-15 19:52:53 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>1997-11-15 19:52:53 +0000
commit9811a7d768316e95d4f07bb4877adaf9834ec499 (patch)
tree66b997a871e9c48f9383c309a5e15e5d49a53aa9 /win32/win32thread.h
parent0e8f3d24353da72545b4a12c255572c1a6a4eeeb (diff)
downloadperl-9811a7d768316e95d4f07bb4877adaf9834ec499.tar.gz
Use __declspec(thread) var rather tha TslAlloc & co.
p4raw-id: //depot/ansiperl@257
Diffstat (limited to 'win32/win32thread.h')
-rw-r--r--win32/win32thread.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/win32/win32thread.h b/win32/win32thread.h
index 0c6bb55b69..6af548d30a 100644
--- a/win32/win32thread.h
+++ b/win32/win32thread.h
@@ -97,7 +97,8 @@ typedef HANDLE perl_mutex;
} \
} STMT_END
-#define THR ((struct thread *) TlsGetValue(thr_key))
+
+#define THR Perl_getTHR()
#define THREAD_CREATE(t, f) Perl_thread_create(t, f)
#define THREAD_POST_CREATE(t) NOOP
#define THREAD_RET_TYPE DWORD WINAPI
@@ -109,6 +110,8 @@ START_EXTERN_C
void Perl_alloc_thread_key _((void));
int Perl_thread_create _((struct thread *thr, thread_func_t *fn));
void Perl_set_thread_self _((struct thread *thr));
+struct thread *Perl_getTHR _((void));
+void Perl_setTHR _((struct thread *t));
END_EXTERN_C
#define INIT_THREADS NOOP
@@ -122,12 +125,7 @@ END_EXTERN_C
croak("panic: JOIN"); \
} STMT_END
-#define SET_THR(t) \
- STMT_START { \
- if (TlsSetValue(thr_key, (void *) (t)) == 0) \
- croak("panic: TlsSetValue"); \
- } STMT_END
-
+#define SET_THR(t) Perl_setTHR(t)
#define YIELD Sleep(0)
#endif /* _WIN32THREAD_H */