Ignore:
Timestamp:
Mar 29, 2012, 8:11:02 AM (9 years ago)
Author:
gb
Message:

In sem_wait_forever(), don't try to do repeated 1-second timed waits.
(While trying to debug something presumably unrelated on FreeBSD 9.0,
I kept seeing the old implementation return 0 before the semaphore
was raised and got a bit nervous about the assumption that timevals
and timespecs were identical, etc.)

When doing a timed semaphore wait on a platform that uses POSIX
semaphores, use clock_gettime(CLOCK_REALTIME,...) instead of
gettimeofday() to get the current time and avoid any timval/timespec
issues.

This requires linking against librt on Linux; change the affected
Makefiles to do so.

File:
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.