---
title: IOLockUnlock
framework: kernel
role: symbol
role_heading: Function
path: kernel/1553006-iolockunlock
---

# IOLockUnlock

Unlock a mutex.

## Declaration

```occ
void IOLockUnlock(struct IOLock *lock);
```

```occ
void IOLockUnlock(IOLock *lock);
```

## Parameters

- `lock`: Pointer to the allocated lock.

## Discussion

Discussion Unlock the mutex and wake any blocked waiters. Results are undefined if the caller has not locked the mutex. This function may block and so should not be called from interrupt level or while a spin lock is held.

## See Also

### Mutexes

- [IOLockAlloc](kernel/1553021-iolockalloc.md)
- [IOLockInitWithState](kernel/1553028-iolockinitwithstate.md)
- [IOLockFree](kernel/1553034-iolockfree.md)
- [IOTryLock](kernel/1553012-iotrylock.md)
- [IOTakeLock](kernel/1553007-iotakelock.md)
- [IOLockLock](kernel/1553000-iolocklock.md)
- [IOUnlock](kernel/1552994-iounlock.md)
- [IOLockTryLock](kernel/1553018-iolocktrylock.md)
- [IOLockWakeup](kernel/1553016-iolockwakeup.md)
- [IOLockSleep](kernel/1553026-iolocksleep.md)
- [IOLockSleepDeadline](kernel/1553030-iolocksleepdeadline.md)
- [IOLockGetMachLock](kernel/1553008-iolockgetmachlock.md)
