summaryrefslogtreecommitdiff
path: root/thread.h
diff options
context:
space:
mode:
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))