Robert Moore 0d63ea609d Unix user-space OSL: Fix problem with WaitSemaphore.
This fixes a problem with WaitSemaphore where the timeout always
expires immediately if the semaphore is not available.

The default code uses sem_timedwait to support semaphore timeouts. However, the
full implementation is incorrect. sem_timedwait uses an absolute time value,
not a relative time value. Therefore, clock_gettime must be called first in
order to get the current time. The timeout value must be added to the current
time in order to get the absolute time -- which then becomes the latest we are
willing to wait for the semaphore.

Currently, the incorrect implementation will always timeout immediately. This
is not a huge problem, since this OSL is only used for the user-space ACPICA
utilities, but the ASLTS test suite does depend on the correct behavior for
approximately 20 tests.

ACPICA BZ 990.
2012-11-21 08:25:55 -08:00
2012-07-19 14:24:02 -07:00
Description
No description provided
170 MiB
Languages
ASL 68.6%
C 29%
Yacc 0.8%
HTML 0.5%
Shell 0.5%
Other 0.6%