OSRestoreInterrupts

Syntax

#include <cafe/os/OSInterrupts.h>

BOOL OSRestoreInterrupts(BOOL level);

Parameters

level Boolean to denote if interrupts should be disabled or enabled. This argument is usually the return value of a matching call to OSDisableInterrupts.

Return Values

Returns TRUE if interrupts were previously enabled, or FALSE if interrupts were previously disabled.

Description

Restores the current processor core interrupt delivery setting for the current process. This can be helpful, when paired with OSDisableInterrupts to create critical sections, etc., in order to prevent priority-inversion issues. OSRestoreInterrupts takes few processor cycles (7). The result returns whether interrupts were previously enabled.

Do Not Call From

None.

See Also

OSEnableInterrupts
OSDisableInterrupts
OSIsInterruptEnabled
OSUninterruptibleSpinLock_Acquire
OSUninterruptibleSpinLock_Release
OSUninterruptibleSpinLock_TryAcquire
OSUninterruptibleSpinLock_TryAcquireWithTimeout

Revision History

2013/05/08 Automated cleanup pass.
2012/07/31 Cleanup Pass.
2012/04/12 Initial version.


CONFIDENTIAL