c11: Fix missing pthread_mutex_timedlock declaration warnings on MacOSX.

This commit is contained in:
José Fonseca 2014-01-23 13:42:38 +00:00
parent 6b6fdb6aa9
commit cd978ce26a
1 changed files with 7 additions and 1 deletions

View File

@ -41,7 +41,7 @@ Configuration macro:
Use pthread_mutex_timedlock() for `mtx_timedlock()'
Otherwise use mtx_trylock() + *busy loop* emulation.
*/
#if !defined(__CYGWIN__)
#if !defined(__CYGWIN__) && !defined(__APPLE__)
#define EMULATED_THREADS_USE_NATIVE_TIMEDLOCK
#endif
@ -196,6 +196,12 @@ mtx_lock(mtx_t *mtx)
return thrd_success;
}
static inline int
mtx_trylock(mtx_t *mtx);
static inline void
thrd_yield(void);
// 7.25.4.4
static inline int
mtx_timedlock(mtx_t *mtx, const xtime *xt)