diff options
Diffstat (limited to 'cpukit/posix/src/mutextimedlock.c')
-rw-r--r-- | cpukit/posix/src/mutextimedlock.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/cpukit/posix/src/mutextimedlock.c b/cpukit/posix/src/mutextimedlock.c index 30c4be7753..c2f00785e2 100644 --- a/cpukit/posix/src/mutextimedlock.c +++ b/cpukit/posix/src/mutextimedlock.c @@ -23,10 +23,9 @@ #include <rtems/system.h> #include <rtems/score/coremuteximpl.h> -#include <rtems/score/watchdog.h> +#include <rtems/score/todimpl.h> #include <rtems/posix/muteximpl.h> #include <rtems/posix/priorityimpl.h> -#include <rtems/posix/time.h> /** * 11.3.3 Locking and Unlocking a Mutex, P1003.1c/Draft 10, p. 93 @@ -40,7 +39,7 @@ int pthread_mutex_timedlock( { Watchdog_Interval ticks; bool do_wait = true; - POSIX_Absolute_timeout_conversion_results_t status; + TOD_Absolute_timeout_conversion_results status; int lock_status; /* @@ -52,12 +51,12 @@ int pthread_mutex_timedlock( * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. * - * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, - * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, + * If the status is TOD_ABSOLUTE_TIMEOUT_INVALID, + * TOD_ABSOLUTE_TIMEOUT_IS_IN_PAST, or TOD_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ - status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); - if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) + status = _TOD_Absolute_timeout_to_ticks( abstime, &ticks ); + if ( status != TOD_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); @@ -68,10 +67,10 @@ int pthread_mutex_timedlock( * make sure the right reason is returned. */ if ( !do_wait && (lock_status == EBUSY) ) { - if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) + if ( status == TOD_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; - if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || - status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) + if ( status == TOD_ABSOLUTE_TIMEOUT_IS_IN_PAST || + status == TOD_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } |