Back to Darwin Xnu

Lock Release

osfmk/man/lock_release.html

latest1.2 KB
Original Source

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.

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