X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/9bccf70c0258c7cac2dcb80011b2a964d884c552..39236c6e673c41db228275375ab7fdb0f837b292:/osfmk/man/semaphore_wait.html diff --git a/osfmk/man/semaphore_wait.html b/osfmk/man/semaphore_wait.html old mode 100755 new mode 100644 index 04a8df9d8..82353a6b6 --- a/osfmk/man/semaphore_wait.html +++ b/osfmk/man/semaphore_wait.html @@ -1 +1,52 @@ -

semaphore_wait


Function - Wait on the specified semaphore.

SYNOPSIS

kern_return_t   semaphore_wait
                (semaphore_t                          semaphore);

PARAMETERS

semaphore
[in send right] The port naming the semaphore that the wait operation is being performed upon.

DESCRIPTION

The semaphore_wait function decrements the semaphore count. If the semaphore count is negative after decrementing, the calling thread blocks. Device driver interrupt service routines (ISR) should never execute semaphore_wait, since waiting on a semaphore at the ISR level may, and often will, lead to a deadlock.

RETURN VALUES

KERN_INVALID_ARGUMENT
The specified semaphore is invalid.

KERN_TERMINATED
The specified semaphore has been destroyed.

KERN_ABORTED
The caller was blocked due to a negative count on the semaphore, and was awoken for a reason not related to the semaphore subsystem (e.g. thread_terminate).

KERN_SUCCESS
The semaphore wait operation was successful.

RELATED INFORMATION

Functions: semaphore_create, semaphore_destroy, semaphore_signal, semaphore_signal_all, device_get_status. \ No newline at end of file +

semaphore_wait

+
+

+Function - Wait on the specified semaphore. +

SYNOPSIS

+
+kern_return_t   semaphore_wait
+                (semaphore_t                          semaphore);
+
+

PARAMETERS

+
+

+

semaphore +
+[in send right] The port naming the semaphore that the wait operation is being performed upon. +
+

DESCRIPTION

+

+The semaphore_wait function decrements the semaphore count. If the +semaphore count is negative after decrementing, the calling thread +blocks. Device driver interrupt service routines (ISR) should never +execute semaphore_wait, since waiting on a semaphore at the ISR level +may, and often will, lead to a deadlock. +

RETURN VALUES

+
+

+

KERN_INVALID_ARGUMENT +
+The specified semaphore is invalid. +

+

KERN_TERMINATED +
+The specified semaphore has been destroyed. +

+

KERN_ABORTED +
+The caller was blocked due to a negative count on the semaphore, and was + awoken for a reason not related to the semaphore subsystem + (e.g. thread_terminate). +

+

KERN_SUCCESS +
+The semaphore wait operation was successful. +
+

RELATED INFORMATION

+

+Functions: +semaphore_create, +semaphore_destroy, +semaphore_signal, +semaphore_signal_all, +device_get_status.