mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-06 11:18:30 +00:00
Make futexes cancellable by pthreads
This commit is contained in:
parent
2278327eba
commit
022536cab6
101 changed files with 627 additions and 391 deletions
6
third_party/nsync/mu_semaphore.h
vendored
6
third_party/nsync/mu_semaphore.h
vendored
|
@ -12,13 +12,13 @@ typedef struct nsync_semaphore_s_ {
|
|||
void nsync_mu_semaphore_init(nsync_semaphore *s);
|
||||
|
||||
/* Wait until the count of *s exceeds 0, and decrement it. */
|
||||
void nsync_mu_semaphore_p(nsync_semaphore *s);
|
||||
errno_t nsync_mu_semaphore_p(nsync_semaphore *s);
|
||||
|
||||
/* Wait until one of: the count of *s is non-zero, in which case
|
||||
decrement *s and return 0; or abs_deadline expires, in which case
|
||||
return ETIMEDOUT. */
|
||||
int nsync_mu_semaphore_p_with_deadline(nsync_semaphore *s,
|
||||
nsync_time abs_deadline);
|
||||
errno_t nsync_mu_semaphore_p_with_deadline(nsync_semaphore *s,
|
||||
nsync_time abs_deadline);
|
||||
|
||||
/* Ensure that the count of *s is at least 1. */
|
||||
void nsync_mu_semaphore_v(nsync_semaphore *s);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue