Skip to content

Commit

Permalink
xen: Use this_cpu_inc_return
Browse files Browse the repository at this point in the history
__this_cpu_inc_return reduces code and simplifies code.

Cc: Jeremy Fitzhardinge <[email protected]>
Acked-by: H. Peter Anvin <[email protected]>
Signed-off-by: Christoph Lameter <[email protected]>
  • Loading branch information
Christoph Lameter authored and htejun committed Dec 17, 2010
1 parent cd85fc5 commit b2e4ae6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/xen/events.c
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ static void __xen_evtchn_do_upcall(void)

vcpu_info->evtchn_upcall_pending = 0;

if (__get_cpu_var(xed_nesting_count)++)
if (__this_cpu_inc_return(xed_nesting_count) - 1)
goto out;

#ifndef CONFIG_X86 /* No need for a barrier -- XCHG is a barrier on x86. */
Expand Down

0 comments on commit b2e4ae6

Please sign in to comment.