12static inline bool interrupts_enabled(
void) {
14 __asm__ __volatile__(
"pushfq; popq %0" :
"=r"(
flags));
15 return (
flags & (1UL << 9)) != 0;
18static void update_apic_irqs(
IRQL newLevel) {
49static inline void toggle_scheduler(
void) {
78 bool prev_if = interrupts_enabled();
92 update_apic_irqs(NewIrql);
121 bool prev_if = interrupts_enabled();
125 if (NewIrql > curr) {
132 update_apic_irqs(NewIrql);
148 if (prev_if)
__sti();
176 bool prev_if = interrupts_enabled();
181 update_apic_irqs(NewIrql);
182 if (prev_if)
__sti();
193 bool prev_if = interrupts_enabled();
200 IN bool EnabledBefore
206 if (EnabledBefore)
__sti();
217 return interrupts_enabled();
void MhRequestSoftwareInterrupt(IN IRQL RequestIrql)
NORETURN void MeBugCheck(IN enum _BUGCHECK_CODES BugCheckCode)
FORCEINLINE void __sti(void)
FORCEINLINE void __write_cr8(unsigned long val)
FORCEINLINE void __cli(void)
bool MeDisableInterrupts(void)
void MeRaiseIrql(IN IRQL NewIrql, OUT PIRQL OldIrql)
bool MeAreInterruptsEnabled(void)
void MeEnableInterrupts(IN bool EnabledBefore)
void _MeSetIrql(IN IRQL NewIrql)
void MeLowerIrql(IN IRQL NewIrql)
@ IRQL_NOT_GREATER_OR_EQUAL
FORCEINLINE IRQL MeGetCurrentIrql(void)
FORCEINLINE PPROCESSOR MeGetCurrentProcessor(void)
volatile bool schedulerEnabled
volatile bool DpcRoutineActive
volatile bool DpcInterruptRequested
volatile bool ApcRoutineActive
volatile bool ApcInterruptRequested