diff options
Diffstat (limited to 'thread.h')
-rw-r--r-- | thread.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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)) |