mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-19 05:39:17 +02:00
Avoid compiler warning on OSX
This commit is contained in:
parent
63d009ca02
commit
e96ed6266a
1 changed files with 4 additions and 0 deletions
|
@ -219,6 +219,9 @@
|
|||
double value;
|
||||
Cyc_check_mutex(data, obj);
|
||||
Cyc_check_num(data, timeout);
|
||||
#ifdef __APPLE__
|
||||
int result = pthread_mutex_lock(&(m->lock);
|
||||
#else
|
||||
value = unbox_number(timeout);
|
||||
set_thread_blocked(data, k);
|
||||
clock_gettime(CLOCK_REALTIME, &tim);
|
||||
|
@ -227,6 +230,7 @@
|
|||
tim.tv_sec += (long)value;
|
||||
tim.tv_nsec += (long)((value - ((long)value)) * 1000 * NANOSECONDS_PER_MILLISECOND);
|
||||
int result = pthread_mutex_timedlock(&(m->lock), &tim);
|
||||
#endif
|
||||
if (result != 0) {
|
||||
return_thread_runnable(data, boolean_f);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue