summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/semtimedwait.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2006-11-17 22:49:30 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2006-11-17 22:49:30 +0000
commit4d0bb65e12cd42768348d26d715c549389cc4894 (patch)
treee111cd7a6f40b75a32257dd3cb42be9a647b821d /cpukit/posix/src/semtimedwait.c
parent2006-11-17 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-4d0bb65e12cd42768348d26d715c549389cc4894.tar.bz2
2006-11-17 Joel Sherrill <joel@OARcorp.com>
* posix/src/keygetspecific.c, posix/src/keysetspecific.c, posix/src/semtimedwait.c: Correct indexing of key data to use api and index NOT class and index. Class is always 1.
Diffstat (limited to 'cpukit/posix/src/semtimedwait.c')
-rw-r--r--cpukit/posix/src/semtimedwait.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/cpukit/posix/src/semtimedwait.c b/cpukit/posix/src/semtimedwait.c
index b0cb78deca..662845ecd9 100644
--- a/cpukit/posix/src/semtimedwait.c
+++ b/cpukit/posix/src/semtimedwait.c
@@ -48,18 +48,18 @@ int sem_timedwait(
blocking = CORE_SEMAPHORE_BAD_TIMEOUT_VALUE;
else
#endif
- if ( abstime->tv_nsec >= TOD_NANOSECONDS_PER_SECOND )
- blocking = CORE_SEMAPHORE_BAD_TIMEOUT_VALUE;
- else {
- (void) clock_gettime( CLOCK_REALTIME, &current_time );
+ if ( abstime->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
+ blocking = CORE_SEMAPHORE_BAD_TIMEOUT;
+ } else {
+ clock_gettime( CLOCK_REALTIME, &current_time );
/*
* Make sure the abstime is in the future
*/
if ( abstime->tv_sec < current_time.tv_sec )
- blocking = CORE_SEMAPHORE_BAD_TIMEOUT_VALUE;
+ blocking = CORE_SEMAPHORE_BAD_TIMEOUT;
else if ( (abstime->tv_sec == current_time.tv_sec) &&
(abstime->tv_nsec <= current_time.tv_nsec) )
- blocking = CORE_SEMAPHORE_BAD_TIMEOUT_VALUE;
+ blocking = CORE_SEMAPHORE_BAD_TIMEOUT;
else {
_POSIX_Timespec_subtract( &current_time, abstime, &difference );
ticks = _POSIX_Timespec_to_interval( &difference );