auto import from //branches/cupcake/...@132276
This commit is contained in:
@@ -469,7 +469,7 @@ timer_settime( timer_t id,
|
||||
}
|
||||
|
||||
if ( __likely(!TIMER_ID_IS_WRAPPED(id)) ) {
|
||||
return __timer_gettime( id, ospec );
|
||||
return __timer_settime( id, flags, spec, ospec );
|
||||
} else {
|
||||
thr_timer_t* timer = thr_timer_from_id(id);
|
||||
struct timespec expires, now;
|
||||
@@ -560,11 +560,11 @@ timer_thread_start( void* _arg )
|
||||
if (timespec_cmp( &expires, &now ) > 0)
|
||||
{
|
||||
/* cool, there was no overrun, so compute the
|
||||
* relative timeout as 'now - expires', then wait
|
||||
* relative timeout as 'expires - now', then wait
|
||||
*/
|
||||
int ret;
|
||||
struct timespec diff = now;
|
||||
timespec_sub( &diff, &expires );
|
||||
struct timespec diff = expires;
|
||||
timespec_sub( &diff, &now );
|
||||
|
||||
ret = __pthread_cond_timedwait_relative(
|
||||
&timer->cond, &timer->mutex, &diff);
|
||||
|
Reference in New Issue
Block a user