unlock_enable Kernel Service
Purpose
Unlocks a simple lock if necessary, and restores the interrupt priority.
Syntax
#include <sys/lock_def.h>
void unlock_enable ( int_pri, lock_addr)
int int_pri;
simple_lock_t lock_addr;Parameters
| Item | Description |
|---|---|
| int_pri | Specifies the interrupt priority to restore. This must be set to the value returned by the
corresponding call to the disable_lock kernel service. |
| lock_addr | Specifies the address of the lock word to unlock. |
Description
The unlock_enable kernel service unlocks
a simple lock if necessary, and restores the interrupt priority, in
order to provide optimized thread-interrupt critical section protection
for the system on which it is executing. On a multiprocessor system,
calling the unlock_enable kernel service is equivalent to calling
the simple_unlock and i_enable kernel services.
On a uniprocessor system, the call to the simple_unlock service
is not necessary, and is omitted. However, you should still pass the
valid lock address which was used with the corresponding call to the disable_lock kernel
service. Never pass a NULL lock address.
Execution Environment
The unlock_enable kernel service can be called from either the process or interrupt environment.
Return Values
The unlock_enable kernel service has no return values.