#796 closed defect (fixed)
sem_timedwait is using relative time instead of absolute time
Reported by: | dufault | Owned by: | Joel Sherrill |
---|---|---|---|
Priority: | normal | Milestone: | 2 |
Component: | score | Version: | 4.6 |
Severity: | major | Keywords: | |
Cc: | bugs@… | Blocked By: | |
Blocking: |
Description
POSIX specifies an absolute time for sem_timedwait(). RTEMS is using a relative time. The code from pthread_cond timedwait() can be used, as in the attachment. Note, though, that POSIX specifies that the struct timespec shouldn't be examined if the semaphore won't block - someone will have to look deeper to check that.
Release:
4.6.99
Environment:
RTEMS POSIX interface
How-To-Repeat:
Try to do a timed wait specifying five seconds after midnight, January 1 1970. It should timeout immediately, RTEMS will timeout after five seconds.
Attachments (2)
Change History (2)
comment:1 Changed on 09/01/05 at 13:46:10 by Joel Sherrill
Status: | assigned → closed |
---|
Note: See
TracTickets for help on using
tickets.
State-Changed-From-To: open->closed
State-Changed-Why: Attached patch applied to 4.6 branch and trunk. I took your
patch and added the error checking required.