X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/48fa4301adf5198d9af23f431c54ffc8f67890dd..db93cd1c0fc7fed756efeb7ffad21d553f41be97:/src/xbt/xbt_os_thread.c?ds=sidebyside diff --git a/src/xbt/xbt_os_thread.c b/src/xbt/xbt_os_thread.c index 023848edb7..8465beb8dd 100644 --- a/src/xbt/xbt_os_thread.c +++ b/src/xbt/xbt_os_thread.c @@ -317,6 +317,10 @@ xbt_os_sem_acquire(xbt_os_sem_t sem) void xbt_os_sem_timedacquire(xbt_os_sem_t sem,double timeout) { + /* mac os x have not the sem_timedwait() function */ + #ifndef HAVE_SEM_TIMEDWAIT + THROW_UNIMPLEMENTED; + #else int errcode; struct timespec ts_end; double end = timeout + xbt_os_time(); @@ -346,6 +350,7 @@ void xbt_os_sem_timedacquire(xbt_os_sem_t sem,double timeout) THROW3(system_error,errcode,"sem_timedwait(%p,%f) failed: %s",sem,timeout, strerror(errcode)); } } + #endif } void