simple_unlock Kernel Service

Purpose

Unlocks a simple lock.

Syntax

#include <sys/lock_def.h>

void simple_unlock ( lock_addr)
simple_lock_t lock_addr;

Parameter

Item Description
lock_addr Specifies the address of the lock word to unlock.

Description

The simple_unlock kernel service unlocks the specified simple lock. The lock must be held by the thread which calls the simple_unlock kernel service. Once the simple lock is unlocked, the highest priority thread (if any) which is waiting for it is made runnable, and may compete for the lock again. If at least one kernel thread was waiting for the lock, the priority of the calling kernel thread is recomputed.

Note: When using simple locks to protect thread-interrupt critical sections, it is recommended that you use the unlock_enable kernel service instead of calling the simple_unlock kernel service directly.

Execution Environment

The simple_unlock kernel service can be called from the process environment only.

Return Values

The simple_unlock kernel service has no return values.