mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-11-16 12:34:45 +00:00
2006-11-17 Joel Sherrill <joel@OARcorp.com>
* posix/src/semtimedwait.c: Used wrong constant for blocking with bad timeout value.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2006-11-17 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* posix/src/semtimedwait.c: Used wrong constant for blocking with bad
|
||||
timeout value.
|
||||
|
||||
2006-11-17 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* posix/src/keygetspecific.c, posix/src/keysetspecific.c: Correct
|
||||
|
||||
@@ -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, ¤t_time );
|
||||
if ( abstime->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
|
||||
blocking = CORE_SEMAPHORE_BAD_TIMEOUT;
|
||||
} else {
|
||||
clock_gettime( CLOCK_REALTIME, ¤t_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( ¤t_time, abstime, &difference );
|
||||
ticks = _POSIX_Timespec_to_interval( &difference );
|
||||
|
||||
Reference in New Issue
Block a user