#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 */
} 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))