---
title: IORWLockWrite
framework: driverkit
role: symbol
role_heading: Function
path: driverkit/iorwlockwrite
---

# IORWLockWrite

## Declaration

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

## Parameters

- `lock`: Pointer to the allocated lock.

## Discussion

Discussion Lock a read/write lock for write. 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.

## See Also

### Functions

- [dequeue_head](driverkit/dequeue_head.md)
- [dequeue_tail](driverkit/dequeue_tail.md)
- [enqueue_head](driverkit/enqueue_head.md)
- [enqueue_tail](driverkit/enqueue_tail.md)
- [get_IOHistogramReporter_IVars](driverkit/get_iohistogramreporter_ivars-4lwpg.md)
- [get_IOHistogramReporter_IVars](driverkit/get_iohistogramreporter_ivars-5lkdv.md)
- [get_IOReporter_IVars](driverkit/get_ioreporter_ivars-6q8vt.md)
- [get_IOReporter_IVars](driverkit/get_ioreporter_ivars-89ntc.md)
- [get_IOStateReporter_IVars](driverkit/get_iostatereporter_ivars-3g28i.md)
- [get_IOStateReporter_IVars](driverkit/get_iostatereporter_ivars-56435.md)
- [insque](driverkit/insque.md)
- [IOCallOnce](driverkit/iocallonce.md)
- [IOLockAlloc](driverkit/iolockalloc.md)
- [IOLockAssert](driverkit/iolockassert.md)
- [IOLockFree](driverkit/iolockfree.md)
