summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-06-21 16:38:56 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-06-21 16:38:56 +0000
commitebe25393f2842134ce34c0c7c88faf86233644ee (patch)
tree6520552cee78f65fe6acd2f7c42cfb1b6430f598
parent7455eafad10367bfbe5ffc416c8b7424bd4e1d9b (diff)
2010-06-21 Peter Dufault <dufault@hda.com>
PR 1570/cpukit * posix/src/semtimedwait.c: This routine is supposed to return -1/errno NOT the status directly.
-rw-r--r--cpukit/ChangeLog6
-rw-r--r--cpukit/posix/src/semtimedwait.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 6dc6457da6..4d0b480e9a 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,3 +1,9 @@
+2010-06-21 Peter Dufault <dufault@hda.com>
+
+ PR 1570/cpukit
+ * posix/src/semtimedwait.c: This routine is supposed to return -1/errno
+ NOT the status directly.
+
2009-12-10 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1482
diff --git a/cpukit/posix/src/semtimedwait.c b/cpukit/posix/src/semtimedwait.c
index 6a78c742d0..b3b49c3060 100644
--- a/cpukit/posix/src/semtimedwait.c
+++ b/cpukit/posix/src/semtimedwait.c
@@ -69,10 +69,10 @@ int sem_timedwait(
if ( !do_wait && (lock_status == EBUSY) ) {
switch (lock_status) {
case POSIX_ABSOLUTE_TIMEOUT_INVALID:
- return EINVAL;
+ rtems_set_errno_and_return_minus_one( EINVAL );
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST:
case POSIX_ABSOLUTE_TIMEOUT_IS_NOW:
- return ETIMEDOUT;
+ rtems_set_errno_and_return_minus_one( ETIMEDOUT );
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}