mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-02 09:18:31 +00:00
Support futexes on FreeBSD
This commit is contained in:
parent
795d295590
commit
7549a5755e
10 changed files with 81 additions and 31 deletions
|
@ -27,14 +27,14 @@
|
|||
* Waits for condition with optional time limit, e.g.
|
||||
*
|
||||
* struct timespec ts; // one second timeout
|
||||
* ts = _timespec_add(_timespec_mono(), _timespec_frommillis(1000));
|
||||
* ts = _timespec_add(_timespec_real(), _timespec_frommillis(1000));
|
||||
* if (pthread_cond_timedwait(cond, mutex, &ts) == ETIMEDOUT) {
|
||||
* // handle timeout...
|
||||
* }
|
||||
*
|
||||
* @param mutex needs to be held by thread when calling this function
|
||||
* @param abstime may be null to wait indefinitely and should contain
|
||||
* some arbitrary interval added to a `CLOCK_MONOTONIC` timestamp
|
||||
* some arbitrary interval added to a `CLOCK_REALTIME` timestamp
|
||||
* @return 0 on success, or errno on error
|
||||
* @raise ETIMEDOUT if `abstime` was specified and the current time
|
||||
* exceeded its value
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue