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

# IORWLockWrite

```
void IORWLockWrite(struct IORWLock *lock);
```

## Parameters

`lock`

Pointer to the allocated lock.

## Discussion

\abstract Lock a read/write lock for write.
\discussion Lock the lock for write, allowing one writer exlusive access. If the lock is held for read or write, block waiting for its unlock. Locking the lock recursively from one thread, for read or write, can result in deadlock.

---

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)