Skip to content

Commit

Permalink
xen/preempt: use need_resched() instead of should_resched()
Browse files Browse the repository at this point in the history
This code is used only when CONFIG_PREEMPT=n and only in non-atomic
context: xen_in_preemptible_hcall is set only in
privcmd_ioctl_hypercall().  Thus preempt_count is zero and
should_resched() is equal to need_resched().

Signed-off-by: Konstantin Khlebnikov <[email protected]>
Signed-off-by: David Vrabel <[email protected]>
  • Loading branch information
koct9i authored and David Vrabel committed Aug 20, 2015
1 parent 772f95e commit a7da51a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/xen/preempt.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ EXPORT_SYMBOL_GPL(xen_in_preemptible_hcall);
asmlinkage __visible void xen_maybe_preempt_hcall(void)
{
if (unlikely(__this_cpu_read(xen_in_preemptible_hcall)
&& should_resched())) {
&& need_resched())) {
/*
* Clear flag as we may be rescheduled on a different
* cpu.
Expand Down

0 comments on commit a7da51a

Please sign in to comment.