preempt_enable();
} else
preempt_enable_no_resched();
-
}
EXPORT_SYMBOL(raw_local_irq_restore);
}
EXPORT_SYMBOL(raw_local_irq_enable);
-/* Cannot use preempt_enable() here as we would recurse in preempt_sched(). */
-int raw_irqs_disabled(void)
+/*
+ * For spinlocks, etc.:
+ */
+
+unsigned long __raw_local_irq_save(void)
{
struct vcpu_info *_vcpu;
- int disabled;
+ unsigned long flags;
preempt_disable();
_vcpu = &HYPERVISOR_shared_info->vcpu_info[__vcpu_id];
- disabled = (_vcpu->evtchn_upcall_mask != 0);
+ flags = _vcpu->evtchn_upcall_mask;
+ _vcpu->evtchn_upcall_mask = 1;
preempt_enable_no_resched();
- return disabled;
+
+ return flags;
}
-EXPORT_SYMBOL(raw_irqs_disabled);
+EXPORT_SYMBOL(__raw_local_irq_save);
-unsigned long __raw_local_irq_save(void)
+/* Cannot use preempt_enable() here as we would recurse in preempt_sched(). */
+int raw_irqs_disabled(void)
{
struct vcpu_info *_vcpu;
- unsigned long flags;
+ int disabled;
preempt_disable();
_vcpu = &HYPERVISOR_shared_info->vcpu_info[__vcpu_id];
- flags = _vcpu->evtchn_upcall_mask;
- _vcpu->evtchn_upcall_mask = 1;
+ disabled = (_vcpu->evtchn_upcall_mask != 0);
preempt_enable_no_resched();
- return flags;
+ return disabled;
}
-EXPORT_SYMBOL(__raw_local_irq_save);
+EXPORT_SYMBOL(raw_irqs_disabled);