Avoid compiler warning on OSX

This commit is contained in:
Justin Ethier 2019-12-23 19:06:48 -05:00
parent 63d009ca02
commit e96ed6266a

View file

@ -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);
}