summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/semtimedwait.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2006-11-17 22:53:56 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2006-11-17 22:53:56 +0000
commit8441e5ef83b435cb5ef17a751dddaa61fb637f84 (patch)
tree048dacb659df2f0f3eff3d1545ac5acb7b287d4d /cpukit/posix/src/semtimedwait.c
parent2006-11-17 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-8441e5ef83b435cb5ef17a751dddaa61fb637f84.tar.bz2
2006-11-17 Joel Sherrill <joel@OARcorp.com>
* posix/src/semtimedwait.c: Used wrong constant for blocking with bad timeout value.
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 );