aboutsummaryrefslogtreecommitdiff
path: root/src/threading.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/threading.h')
-rw-r--r--src/threading.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/threading.h b/src/threading.h
index aa34248..4b28ce8 100644
--- a/src/threading.h
+++ b/src/threading.h
@@ -194,10 +194,16 @@ bool_t SIGNAL_WAIT( SIGNAL_T *ref, MUTEX_T *mu, time_d timeout );
194# define THREAD_PRIO_MIN (-3) 194# define THREAD_PRIO_MIN (-3)
195# define THREAD_PRIO_MAX (+3) 195# define THREAD_PRIO_MAX (+3)
196 196
197#define THREAD_CLEANUP_PUSH( cb_, val_)
198#define THREAD_CLEANUP_POP( execute_)
199
197#else // THREADAPI == THREADAPI_PTHREAD 200#else // THREADAPI == THREADAPI_PTHREAD
198 /* Platforms that have a timed 'pthread_join()' can get away with a simpler 201 /* Platforms that have a timed 'pthread_join()' can get away with a simpler
199 * implementation. Others will use a condition variable. 202 * implementation. Others will use a condition variable.
200 */ 203 */
204#if defined __WINPTHREADS_VERSION
205#define USE_PTHREAD_TIMEDJOIN
206#endif // __WINPTHREADS_VERSION
201# ifdef USE_PTHREAD_TIMEDJOIN 207# ifdef USE_PTHREAD_TIMEDJOIN
202# ifdef PLATFORM_OSX 208# ifdef PLATFORM_OSX
203# error "No 'pthread_timedjoin()' on this system" 209# error "No 'pthread_timedjoin()' on this system"
@@ -229,6 +235,9 @@ bool_t SIGNAL_WAIT( SIGNAL_T *ref, MUTEX_T *mu, time_d timeout );
229# define THREAD_PRIO_MIN (-2) 235# define THREAD_PRIO_MIN (-2)
230# define THREAD_PRIO_MAX (+2) 236# define THREAD_PRIO_MAX (+2)
231# endif 237# endif
238
239#define THREAD_CLEANUP_PUSH( cb_, val_) pthread_cleanup_push( cb_, val_)
240#define THREAD_CLEANUP_POP( execute_) pthread_cleanup_pop( execute_)
232#endif // THREADAPI == THREADAPI_WINDOWS 241#endif // THREADAPI == THREADAPI_WINDOWS
233 242
234/* 243/*
@@ -253,7 +262,8 @@ bool_t THREAD_WAIT_IMPL( THREAD_T *ref, double secs, SIGNAL_T *signal_ref, MUTEX
253#define THREAD_WAIT THREAD_WAIT_IMPL 262#define THREAD_WAIT THREAD_WAIT_IMPL
254#endif // // THREADWAIT_METHOD == THREADWAIT_CONDVAR 263#endif // // THREADWAIT_METHOD == THREADWAIT_CONDVAR
255 264
256void THREAD_KILL( THREAD_T *ref ); 265void THREAD_KILL( THREAD_T* ref);
257void THREAD_SETNAME( char const* _name); 266void THREAD_SETNAME( char const* _name);
267void THREAD_MAKE_ASYNCH_CANCELLABLE();
258 268
259#endif // __threading_h__ 269#endif // __threading_h__