00001
00008
00009
00010
00011
00012
00013 #if COMPILE_THREADS
00014 #ifndef BASE_THREAD_COMMON_HH
00015 #define BASE_THREAD_COMMON_HH 1
00016
00017
00018
00019 #include "base_assert.hh"
00020 #include "base_typesig.hh"
00021
00022
00023
00024
00025 #if DEBUG
00026 #define PTHREAD_CALL( CALL ) ASSERT_UNLESS_EXITING( ((CALL) == 0) )
00027 #else
00028 #define PTHREAD_CALL( CALL ) CALL
00029 #endif
00030
00031
00032 #if OS_DARWIN || OS_CYGWIN
00033 #define THREAD_YIELD sched_yield
00034 #else
00035 #define THREAD_YIELD pthread_yield
00036 #endif
00037
00038 #endif // BASE_THREAD_COMMON_HH
00039 #endif // COMPILE_THREADS