## semaphore_signal

Function - Increments the semaphore count.

### SYNOPSIS

    kern_return_t   semaphore_signal
                    (semaphore_t                          semaphore);

### PARAMETERS

semaphore
  [in send right] The port naming the semaphore to be signalled.

### DESCRIPTION

The semaphore_signal function increments the semaphore count. If the count goes non-negative (i.e. greater than or equal to 0) and a thread is blocked on the semaphore, then the waiting thread is scheduled to execute. If multiple threads are blocked on the semaphore, the thread scheduled to execute is selected according to the wakeup policy of the semaphore (set when the semaphore was created via semaphore_create). Device driver interrupt service routines may safely execute semaphore_signal operations without causing a deadlock.

### RETURN VALUES

KERN_INVALID_ARGUMENT
  The specified semaphore is invalid.

KERN_TERMINATED
  The specified semaphore has been destroyed.

KERN_SUCCESS
  The semaphore has been signalled.

### RELATED INFORMATION

Functions: semaphore_create, semaphore_destroy, semaphore_signal_all, semaphore_wait, device_get_status.