X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/9bccf70c0258c7cac2dcb80011b2a964d884c552..39236c6e673c41db228275375ab7fdb0f837b292:/osfmk/man/lock_try.html diff --git a/osfmk/man/lock_try.html b/osfmk/man/lock_try.html old mode 100755 new mode 100644 index 2fe0a676b..7517f50ef --- a/osfmk/man/lock_try.html +++ b/osfmk/man/lock_try.html @@ -1 +1,62 @@ -

lock_try


Function - Attempt to acquire access rights to a lock.

SYNOPSIS

kern_return_t   lock_try
                (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 acquired.

DESCRIPTION

The lock_try function attempts to acquire the specified lock without blocking. The return value indicates whether the lock was acquired.

RETURN VALUES

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

KERN_SUCCESS
The lock was acquired.

KERN_LOCK_UNSTABLE
The acquired lock has an unstable state.

KERN_LOCK_SET_DESTROYED
The specified lock has been destroyed.

KERN_LOCK_OWNED
Another thread currently owns the requested lock.

KERN_LOCK_OWNED_SELF
The calling thread already owns the lock.

RELATED INFORMATION

Functions: lock_acquire, lock_make_stable, lock_release, lock_handoff, lock_handoff_accept, lock_set_create, lock_set_destroy. \ No newline at end of file +

lock_try

+
+

+Function - Attempt to acquire access rights to a lock. +

SYNOPSIS

+
+kern_return_t   lock_try
+                (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 acquired. +
+

DESCRIPTION

+

+The lock_try function attempts to acquire the specified lock without +blocking. The return value indicates whether the lock was acquired. +

RETURN VALUES

+
+

+

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

+

KERN_SUCCESS +
+The lock was acquired. +

+

KERN_LOCK_UNSTABLE +
+The acquired lock has an unstable state. +

+

KERN_LOCK_SET_DESTROYED +
+The specified lock has been destroyed. +

+

KERN_LOCK_OWNED +
+Another thread currently owns the requested lock. +

+

KERN_LOCK_OWNED_SELF +
+The calling thread already owns the lock. +
+

RELATED INFORMATION

+

+Functions: +lock_acquire, +lock_make_stable, +lock_release, +lock_handoff, +lock_handoff_accept, +lock_set_create, +lock_set_destroy.