Contents

IOSimpleLockLockDisableInterrupt

Lock a spin lock.

Declaration

IOInterruptState IOSimpleLockLockDisableInterrupt(IOSimpleLock *lock);

Parameters

  • lock:

    Pointer to the lock.

Discussion

Lock the spin lock. If the lock is held, spin waiting for its unlock. Simple locks disable preemption, cannot be held across any blocking operation, and should be held for very short periods. When used to synchronize between interrupt context and thread context they should be locked with interrupts disabled - IOSimpleLockLockDisableInterrupt() will do both. Locking the lock recursively from one thread will result in deadlock.

See Also

Simple Locks