lkml.org 
[lkml]   [2010]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[cpuops inc_return V1 9/9] Xen: Use this_cpu_inc_return
    __this_cpu_inc_return reduces code and simplifies code.

    Cc: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
    Signed-off-by: Christoph Lameter <cl@linux.com>

    ---
    drivers/xen/events.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    Index: linux-2.6/drivers/xen/events.c
    ===================================================================
    --- linux-2.6.orig/drivers/xen/events.c 2010-12-06 11:00:18.000000000 -0600
    +++ linux-2.6/drivers/xen/events.c 2010-12-06 11:00:47.000000000 -0600
    @@ -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. */


    \
     
     \ /
      Last update: 2010-12-06 18:43    [W:0.019 / U:0.224 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site