ia64/xen-unstable

changeset 10213:6a3462993320

Make perfc_valuea actually return the value it reads.
Signed-off-by: David Lively <dlively@virtualiron.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue May 30 12:37:49 2006 +0100 (2006-05-30)
parents e0ec3587a2f0
children e58e04589d11
files xen/include/xen/perfc.h
line diff
     1.1 --- a/xen/include/xen/perfc.h	Tue May 30 12:32:07 2006 +0100
     1.2 +++ b/xen/include/xen/perfc.h	Tue May 30 12:37:49 2006 +0100
     1.3 @@ -56,10 +56,8 @@ extern struct perfcounter perfcounters;
     1.4  #define perfc_value(x)    atomic_read(&perfcounters.x[0])
     1.5  #define perfc_valuec(x)   atomic_read(&perfcounters.x[smp_processor_id()])
     1.6  #define perfc_valuea(x,y)                                               \
     1.7 -    do {                                                                \
     1.8 -        if ( (y) < (sizeof(perfcounters.x) / sizeof(*perfcounters.x)) ) \
     1.9 -            atomic_read(&perfcounters.x[y]);                            \
    1.10 -    } while ( 0 )
    1.11 +    ( (y) < (sizeof(perfcounters.x) / sizeof(*perfcounters.x)) ?	\
    1.12 +	atomic_read(&perfcounters.x[y]) : 0 )
    1.13  #define perfc_set(x,v)    atomic_set(&perfcounters.x[0], v)
    1.14  #define perfc_setc(x,v)   atomic_set(&perfcounters.x[smp_processor_id()], v)
    1.15  #define perfc_seta(x,y,v)                                               \