Home | History | Annotate | Download | only in include

Lines Matching refs:semaphore

26 // Creates a new semaphore with an initial value of |value|.
31 // Frees a semaphore allocated with |semaphore_new|. |semaphore| may
33 void semaphore_free(semaphore_t *semaphore);
35 // Decrements the value of |semaphore|. If it is 0, this call blocks until
36 // it becomes non-zero. |semaphore| may not be NULL.
37 void semaphore_wait(semaphore_t *semaphore);
39 // Tries to decrement the value of |semaphore|. Returns true if the value was
40 // decremented, false if the value was 0. This function never blocks. |semaphore|
42 bool semaphore_try_wait(semaphore_t *semaphore);
44 // Increments the value of |semaphore|. |semaphore| may not be NULL.
45 void semaphore_post(semaphore_t *semaphore);
47 // Returns a file descriptor representing this semaphore. The caller may
55 // The caller must not close the returned file descriptor. |semaphore| may not
57 int semaphore_get_fd(const semaphore_t *semaphore);