#include <pthread.h>
typedef struct xbt_os_thread_ {
+ /* KEEP IT IN SYNC WITH xbt_thread.c */
pthread_t t;
void *param;
pvoid_f_pvoid_t *start_routine;
}
/****** mutex related functions ******/
typedef struct xbt_os_mutex_ {
+ /* KEEP IT IN SYNC WITH xbt_thread.c */
pthread_mutex_t m;
} s_xbt_os_mutex_t;
/***** condition related functions *****/
typedef struct xbt_os_cond_ {
+ /* KEEP IT IN SYNC WITH xbt_thread.c */
pthread_cond_t c;
} s_xbt_os_cond_t;
#elif defined(WIN32)
typedef struct xbt_os_thread_ {
+ /* KEEP IT IN SYNC WITH xbt_thread */
HANDLE handle; /* the win thread handle */
unsigned long id; /* the win thread id */
pvoid_f_pvoid_t *start_routine;
/****** mutex related functions ******/
typedef struct xbt_os_mutex_ {
+ /* KEEP IT IN SYNC WITH xbt_thread.c */
CRITICAL_SECTION lock;
} s_xbt_os_mutex_t;
};
typedef struct xbt_os_cond_ {
+ /* KEEP IT IN SYNC WITH xbt_thread.c */
HANDLE events[MAX_EVENTS];
unsigned int waiters_count; /* the number of waiters */