Contents

IORecursiveLockTryLock

Attempt to lock a recursive lock.

Declaration

bool IORecursiveLockTryLock(struct IORecursiveLock *lock);
boolean_t IORecursiveLockTryLock(IORecursiveLock *lock);

Parameters

  • lock:

    Pointer to the allocated lock.

Return Value

True if the lock is now locked by the caller, otherwise false.

Discussion

Lock the lock if it is currently unlocked, or held by the calling thread, and return true. If the lock is held by another thread, return false. Successful calls to IORecursiveLockTryLock should be balanced with calls to IORecursiveLockUnlock.

See Also

Recursive Locks