[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Make perfc_valuea actually return the value it reads.
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID 6a34629933201ac88dd7b02472b7303b05744d3e # Parent e0ec3587a2f03d14e55862311f0a0be9f833d6c0 Make perfc_valuea actually return the value it reads. Signed-off-by: David Lively <dlively@xxxxxxxxxxxxxxx> --- xen/include/xen/perfc.h | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff -r e0ec3587a2f0 -r 6a3462993320 xen/include/xen/perfc.h --- a/xen/include/xen/perfc.h Tue May 30 12:32:07 2006 +0100 +++ b/xen/include/xen/perfc.h Tue May 30 12:37:49 2006 +0100 @@ -56,10 +56,8 @@ extern struct perfcounter perfcounters; #define perfc_value(x) atomic_read(&perfcounters.x[0]) #define perfc_valuec(x) atomic_read(&perfcounters.x[smp_processor_id()]) #define perfc_valuea(x,y) \ - do { \ - if ( (y) < (sizeof(perfcounters.x) / sizeof(*perfcounters.x)) ) \ - atomic_read(&perfcounters.x[y]); \ - } while ( 0 ) + ( (y) < (sizeof(perfcounters.x) / sizeof(*perfcounters.x)) ? \ + atomic_read(&perfcounters.x[y]) : 0 ) #define perfc_set(x,v) atomic_set(&perfcounters.x[0], v) #define perfc_setc(x,v) atomic_set(&perfcounters.x[smp_processor_id()], v) #define perfc_seta(x,y,v) \ _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |