This source file includes following definitions.
- xen_maybe_preempt_hcall
1
2
3
4
5
6
7
8 #include <linux/sched.h>
9 #include <xen/xen-ops.h>
10
11 #ifndef CONFIG_PREEMPT
12
13
14
15
16
17
18
19
20
21
22
23
24 DEFINE_PER_CPU(bool, xen_in_preemptible_hcall);
25 EXPORT_SYMBOL_GPL(xen_in_preemptible_hcall);
26
27 asmlinkage __visible void xen_maybe_preempt_hcall(void)
28 {
29 if (unlikely(__this_cpu_read(xen_in_preemptible_hcall)
30 && need_resched())) {
31
32
33
34
35 __this_cpu_write(xen_in_preemptible_hcall, false);
36 local_irq_enable();
37 cond_resched();
38 local_irq_disable();
39 __this_cpu_write(xen_in_preemptible_hcall, true);
40 }
41 }
42 #endif