Contents

IORecursiveLockTryLock

Declaration

bool IORecursiveLockTryLock(struct IORecursiveLock *lock);

Parameters

  • lock:

    Pointer to the allocated lock.

Return Value

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

Discussion

Attempt to lock a recursive lock.

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

Functions