summaryrefslogtreecommitdiff
path: root/thread.h
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-08-21 16:22:19 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-08-21 16:22:19 +0000
commite1b5da6416e0c12378554a33f21a92b0a14593e9 (patch)
tree1f665d828a00a4c3a91b880d3564724881942ebe /thread.h
parenta4eb266fccae11165d7886ace97009e8b6569d84 (diff)
downloadperl-e1b5da6416e0c12378554a33f21a92b0a14593e9.tar.gz
free TLS slot properly on Windows
p4raw-id: //depot/perl@6748
Diffstat (limited to 'thread.h')
-rw-r--r--thread.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/thread.h b/thread.h
index 206a5c508e..9740dbaf26 100644
--- a/thread.h
+++ b/thread.h
@@ -117,6 +117,7 @@
#define INIT_THREADS cthread_init()
#define YIELD cthread_yield()
#define ALLOC_THREAD_KEY NOOP
+#define FREE_THREAD_KEY NOOP
#define SET_THREAD_SELF(thr) (thr->self = cthread_self())
#endif /* I_MACH_CTHREADS */
@@ -257,6 +258,13 @@
} STMT_END
#endif
+#ifndef FREE_THREAD_KEY
+# define FREE_THREAD_KEY \
+ STMT_START { \
+ pthread_key_delete(PL_thr_key); \
+ } STMT_END
+#endif
+
#ifndef THREAD_RET_TYPE
# define THREAD_RET_TYPE void *
# define THREAD_RET_CAST(p) ((void *)(p))