---
title: IOSimpleLockUnlockEnableInterrupt
framework: kernel
role: symbol
role_heading: Function
path: kernel/1552998-iosimplelockunlockenableinterrup
---

# IOSimpleLockUnlockEnableInterrupt

Unlock a spin lock, and restore interrupt state.

## Declaration

```occ
void IOSimpleLockUnlockEnableInterrupt(IOSimpleLock *lock, IOInterruptState state);
```

## Parameters

- `lock`: Pointer to the lock.
- `state`: The interrupt state returned by IOSimpleLockLockDisableInterrupt()

## Discussion

Discussion Unlock the lock, and restore preemption and interrupts to the state as they were when the lock was taken. Results are undefined if the caller has not locked the lock.

## See Also

### Simple Locks

- [IOSimpleLockAlloc](kernel/1553017-iosimplelockalloc.md)
- [IOSimpleLockInit](kernel/1552990-iosimplelockinit.md)
- [IOSimpleLockDestroy](kernel/3380136-iosimplelockdestroy.md)
- [IOSimpleLockFree](kernel/1553035-iosimplelockfree.md)
- [IOSimpleLockGetMachLock](kernel/1553019-iosimplelockgetmachlock.md)
- [IOSimpleLockLock](kernel/1552997-iosimplelocklock.md)
- [IOSimpleLockLockDisableInterrupt](kernel/1553005-iosimplelocklockdisableinterrupt.md)
- [IOSimpleLockTryLock](kernel/1553029-iosimplelocktrylock.md)
- [IOSimpleLockUnlock](kernel/1553015-iosimplelockunlock.md)
