---
title: IORWLockUnlock
framework: kernel
role: symbol
role_heading: Function
path: kernel/1553011-iorwlockunlock
---

# IORWLockUnlock

Unlock a read/write lock.

## Declaration

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

```occ
void IORWLockUnlock(IORWLock *lock);
```

## Parameters

- `lock`: Pointer to the allocated lock.

## Discussion

Discussion Undo one call to IORWLockRead or IORWLockWrite. Results are undefined if the caller has not locked the lock. This function may block and so should not be called from interrupt level or while a spin lock is held.

## See Also

### Read/Write Locks

- [IORWLockAlloc](kernel/1553010-iorwlockalloc.md)
- [IORWLockFree](kernel/1553003-iorwlockfree.md)
- [IORWLockGetMachLock](kernel/1553033-iorwlockgetmachlock.md)
- [IORWLockRead](kernel/1553004-iorwlockread.md)
- [IORWLockWrite](kernel/1552996-iorwlockwrite.md)
- [IORWUnlock](kernel/1553027-iorwunlock.md)
- [IOWriteLock](kernel/1552985-iowritelock.md)
- [IOReadLock](kernel/1553022-ioreadlock.md)
