Unlocks a simple lock if necessary, and restores the interrupt priority.
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. |
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.
The unlock_enable kernel service can be called from either the process or interrupt environment.
The unlock_enable kernel service has no return values.