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

# IORWLockAlloc

```
struct IORWLock *IORWLockAlloc();
```

## Return Value

Pointer to the allocated lock, or zero on failure.

## Discussion

\abstract Allocates and initializes a read/write lock.
\discussion Allocates and initializes a read/write lock in general purpose memory. Read/write locks provide for multiple readers, one exclusive writer.

---

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)