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

# IORecursiveLockAlloc

```
struct IORecursiveLock *IORecursiveLockAlloc();
```

## Return Value

Pointer to the allocated lock, or zero on failure.

## Discussion

\abstract Allocates and initializes an recursive lock.
\discussion Allocates a recursive lock in general purpose memory, and initializes it. Recursive locks function identically to mutexes but allow one thread to lock more than once, with balanced unlocks.

---

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)