X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6760cb07d6b57be16928d95339d71e57c4e24f36..704a4e40059072862812816366aa40b5dec2873a:/src/xbt/xbt_rl_synchro.c diff --git a/src/xbt/xbt_rl_synchro.c b/src/xbt/xbt_rl_synchro.c index 0bdbba6ea0..c85bf2d2e3 100644 --- a/src/xbt/xbt_rl_synchro.c +++ b/src/xbt/xbt_rl_synchro.c @@ -44,7 +44,8 @@ xbt_thread_t xbt_thread_create(const char *name, void_f_pvoid_t code, res->userparam = param; res->code = code; DEBUG1("Create thread %p", res); - res->os_thread = xbt_os_thread_create(name, xbt_thread_create_wrapper, res); + res->os_thread = + xbt_os_thread_create(name, xbt_thread_create_wrapper, res, NULL); return res; } @@ -93,7 +94,7 @@ struct xbt_mutex_ { /* KEEP IT IN SYNC WITH OS IMPLEMENTATION (both win and lin) */ #ifdef HAVE_PTHREAD_H pthread_mutex_t m; -#elif defined(WIN32) +#elif defined(_XBT_WIN32) CRITICAL_SECTION lock; #endif }; @@ -129,7 +130,7 @@ void xbt_mutex_destroy(xbt_mutex_t mutex) xbt_os_mutex_destroy((xbt_os_mutex_t) mutex); } -#ifdef WIN32 +#ifdef _XBT_WIN32 enum { /* KEEP IT IN SYNC WITH OS IMPLEM */ SIGNAL = 0, BROADCAST = 1, @@ -142,7 +143,7 @@ typedef struct xbt_cond_ { /* KEEP IT IN SYNC WITH OS IMPLEMENTATION (both win and lin) */ #ifdef HAVE_PTHREAD_H pthread_cond_t c; -#elif defined(WIN32) +#elif defined(_XBT_WIN32) HANDLE events[MAX_EVENTS]; unsigned int waiters_count; /* the number of waiters */ @@ -166,7 +167,8 @@ void xbt_cond_wait(xbt_cond_t cond, xbt_mutex_t mutex) void xbt_cond_timedwait(xbt_cond_t cond, xbt_mutex_t mutex, double delay) { DEBUG3("Wait cond %p, mutex %p for %f sec", cond, mutex, delay); - xbt_os_cond_timedwait((xbt_os_cond_t) cond, (xbt_os_mutex_t) mutex, delay); + xbt_os_cond_timedwait((xbt_os_cond_t) cond, (xbt_os_mutex_t) mutex, + delay); DEBUG3("Done waiting cond %p, mutex %p for %f sec", cond, mutex, delay); }