<!--
{
  "availability" : [
    "DriverKit: -",
    "iOS: -",
    "iPadOS: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "DriverKit",
  "identifier" : "/documentation/DriverKit/IORecursiveLockHaveLock",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "DriverKit"
    ],
    "preciseIdentifier" : "c:@F@IORecursiveLockHaveLock"
  },
  "title" : "IORecursiveLockHaveLock"
}
-->

# IORecursiveLockHaveLock

```
bool IORecursiveLockHaveLock(struct IORecursiveLock *lock);
```

## Parameters

`lock`

Pointer to the allocated lock.

## Return Value

True if the calling thread holds the lock otherwise false.

## Discussion

\abstract Check if a recursive lock is held by the calling thread.
\discussion If the lock is held by the calling thread, return true, otherwise the lock is unlocked, or held by another thread and false is returned.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)