lock_release


Function - Release ownership of a lock.

SYNOPSIS

kern_return_t   lock_release
                (lock_set_t                            lock_set,
                 int                                    lock_id);

PARAMETERS

lock_set
[in send right] The port naming the lock set which represents the lock.

lock_id
[in scalar] The lock, represented by the lock set, to be released.

DESCRIPTION

The lock_release function release the ownership of the specified lock. If the calling thread does not own the lock then the call will fail.

RETURN VALUES

KERN_INVALID_ARGUMENT
The specified lock_set is invalid, or the lock_id is out of range.

KERN_INVALID_RIGHT
The specified task does not own the specified lock.

KERN_SUCCESS
The ownership of the lock was released.

KERN_LOCK_SET_DESTROYED
The specified lock has been destroyed.

RELATED INFORMATION

Functions: lock_acquire, lock_make_stable, lock_try, lock_handoff, lock_handoff_accept, lock_set_create, lock_set_destroy.