aboutsummaryrefslogtreecommitdiff
path: root/src/threading.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/threading.h')
-rw-r--r--src/threading.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/threading.h b/src/threading.h
index 8324bdd..24e0998 100644
--- a/src/threading.h
+++ b/src/threading.h
@@ -7,12 +7,6 @@
7 */ 7 */
8#include "platform.h" 8#include "platform.h"
9 9
10typedef int bool_t;
11#ifndef FALSE
12# define FALSE 0
13# define TRUE 1
14#endif
15
16typedef unsigned int uint_t; 10typedef unsigned int uint_t;
17 11
18#include <time.h> 12#include <time.h>
@@ -165,7 +159,7 @@ time_d now_secs(void);
165 159
166time_d SIGNAL_TIMEOUT_PREPARE( double rel_secs ); 160time_d SIGNAL_TIMEOUT_PREPARE( double rel_secs );
167 161
168bool_t SIGNAL_WAIT( SIGNAL_T *ref, MUTEX_T *mu, time_d timeout ); 162bool SIGNAL_WAIT( SIGNAL_T *ref, MUTEX_T *mu, time_d timeout );
169 163
170 164
171/*---=== Threading ===--- 165/*---=== Threading ===---
@@ -209,7 +203,7 @@ bool_t SIGNAL_WAIT( SIGNAL_T *ref, MUTEX_T *mu, time_d timeout );
209 void THREAD_CREATE( THREAD_T* ref, THREAD_RETURN_T (*func)( void*), void* data, int prio /* -3..+3 */); 203 void THREAD_CREATE( THREAD_T* ref, THREAD_RETURN_T (*func)( void*), void* data, int prio /* -3..+3 */);
210 204
211# if defined(PLATFORM_LINUX) 205# if defined(PLATFORM_LINUX)
212 extern volatile bool_t sudo; 206 extern volatile bool sudo;
213# ifdef LINUX_SCHED_RR 207# ifdef LINUX_SCHED_RR
214# define THREAD_PRIO_MIN (sudo ? -3 : 0) 208# define THREAD_PRIO_MIN (sudo ? -3 : 0)
215# else 209# else
@@ -245,10 +239,10 @@ bool_t SIGNAL_WAIT( SIGNAL_T *ref, MUTEX_T *mu, time_d timeout );
245 239
246 240
247#if THREADWAIT_METHOD == THREADWAIT_TIMEOUT 241#if THREADWAIT_METHOD == THREADWAIT_TIMEOUT
248bool_t THREAD_WAIT_IMPL( THREAD_T *ref, double secs); 242bool THREAD_WAIT_IMPL( THREAD_T *ref, double secs);
249#define THREAD_WAIT( a, b, c, d, e) THREAD_WAIT_IMPL( a, b) 243#define THREAD_WAIT( a, b, c, d, e) THREAD_WAIT_IMPL( a, b)
250#else // THREADWAIT_METHOD == THREADWAIT_CONDVAR 244#else // THREADWAIT_METHOD == THREADWAIT_CONDVAR
251bool_t THREAD_WAIT_IMPL( THREAD_T *ref, double secs, SIGNAL_T *signal_ref, MUTEX_T *mu_ref, volatile enum e_status *st_ref); 245bool THREAD_WAIT_IMPL( THREAD_T *ref, double secs, SIGNAL_T *signal_ref, MUTEX_T *mu_ref, volatile enum e_status *st_ref);
252#define THREAD_WAIT THREAD_WAIT_IMPL 246#define THREAD_WAIT THREAD_WAIT_IMPL
253#endif // // THREADWAIT_METHOD == THREADWAIT_CONDVAR 247#endif // // THREADWAIT_METHOD == THREADWAIT_CONDVAR
254 248