_ _swpirql Intrinsic

The _ _swpirql intrinsic has the following declaration:

unsigned char __swpirql(unsigned char);

This intrinsic function executes a CALL_PAL SWPIRQL (Swap Interrupt Request Level) instruction. The argument to the intrinsic is used to supply the new IRQL value; the intrinsic returns the previous IRQL.

This intrinsic may only be executed in kernel mode.