mirror of
https://github.com/acpica/acpica/
synced 2025-02-22 08:24:12 +03:00

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.
…
Description
No description provided
Languages
ASL
68.6%
C
29%
Yacc
0.8%
HTML
0.5%
Shell
0.5%
Other
0.6%