auto import from //branches/cupcake/...@132276

This commit is contained in:
The Android Open Source Project
2009-02-19 10:57:29 -08:00
parent 2489551343
commit 6f04a0f4c7
29 changed files with 1594 additions and 845 deletions

View File

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