From d2dfc5de011fb525161b85a1408f716a2ea358cc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 20 Jun 2000 00:34:21 +0000 Subject: Update. * iconv/gconv_int.h (strict gconv_module): Remove all members associated with regular expressions. Use a simple string as the from name. * iconv/gconv_db.c: Remove code handling regular expressions. * iconv/gconv_conf.c: Likewise. * iconv/iconv_prog.c: Likewise. * iconv/gconv_builtin.h: Adjust for change in gconv_conf.c. --- linuxthreads/sysdeps/pthread/timer_settime.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'linuxthreads/sysdeps/pthread/timer_settime.c') diff --git a/linuxthreads/sysdeps/pthread/timer_settime.c b/linuxthreads/sysdeps/pthread/timer_settime.c index 858edc7..e6c35b4 100644 --- a/linuxthreads/sysdeps/pthread/timer_settime.c +++ b/linuxthreads/sysdeps/pthread/timer_settime.c @@ -41,7 +41,7 @@ timer_settime (timerid, flags, value, ovalue) timer = timer_id2ptr (timerid); if (timer == NULL) { - errno = EINVAL; + __set_errno (EINVAL); goto bail; } @@ -50,7 +50,7 @@ timer_settime (timerid, flags, value, ovalue) || value->it_value.tv_nsec < 0 || value->it_value.tv_nsec >= 1000000000) { - errno = EINVAL; + __set_errno (EINVAL); goto bail; } @@ -64,13 +64,14 @@ timer_settime (timerid, flags, value, ovalue) } pthread_mutex_lock (&__timer_mutex); + timer_addref (timer); /* One final check of timer validity; this one is possible only - until we have the mutex, which guards the inuse flag. */ + until we have the mutex, because it accesses the inuse flag. */ - if (!timer->inuse) + if (! timer_valid(timer)) { - errno = EINVAL; + __set_errno (EINVAL); goto unlock_bail; } @@ -86,6 +87,7 @@ timer_settime (timerid, flags, value, ovalue) clock_gettime (timer->clock, &now); have_now = 1; pthread_mutex_lock (&__timer_mutex); + timer_addref (timer); } timespec_sub (&ovalue->it_value, &timer->expirytime, &now); @@ -123,6 +125,7 @@ timer_settime (timerid, flags, value, ovalue) retval = 0; unlock_bail: + timer_delref (timer); pthread_mutex_unlock (&__timer_mutex); bail: -- cgit v1.1