|
|
|
@ -219,7 +219,7 @@ void vlc_cond_wait (vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex) |
|
|
|
int vlc_cond_timedwait (vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex, |
|
|
|
vlc_tick_t deadline) |
|
|
|
{ |
|
|
|
struct timespec ts = mtime_to_ts (deadline); |
|
|
|
struct timespec ts = timespec_from_vlc_tick (deadline); |
|
|
|
int val = pthread_cond_timedwait (p_condvar, p_mutex, &ts); |
|
|
|
if (val != ETIMEDOUT) |
|
|
|
VLC_THREAD_ASSERT ("timed-waiting on condition"); |
|
|
|
@ -590,7 +590,7 @@ void vlc_tick_wait (vlc_tick_t deadline) |
|
|
|
pthread_once(&vlc_clock_once, vlc_clock_setup_once); |
|
|
|
deadline -= vlc_clock_prec; |
|
|
|
|
|
|
|
struct timespec ts = mtime_to_ts (deadline); |
|
|
|
struct timespec ts = timespec_from_vlc_tick (deadline); |
|
|
|
|
|
|
|
while (clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &ts, NULL) == EINTR); |
|
|
|
} |
|
|
|
@ -598,7 +598,7 @@ void vlc_tick_wait (vlc_tick_t deadline) |
|
|
|
#undef vlc_tick_sleep |
|
|
|
void vlc_tick_sleep (vlc_tick_t delay) |
|
|
|
{ |
|
|
|
struct timespec ts = mtime_to_ts (delay); |
|
|
|
struct timespec ts = timespec_from_vlc_tick (delay); |
|
|
|
|
|
|
|
while (clock_nanosleep(CLOCK_MONOTONIC, 0, &ts, &ts) == EINTR); |
|
|
|
} |
|
|
|
|