WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

[XenPPC] [xenppc-unstable] Make perfc_valuea actually return the value i

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [xenppc-unstable] Make perfc_valuea actually return the value it reads.
From: Xen patchbot-xenppc-unstable <patchbot-xenppc-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 02 Jun 2006 17:55:50 +0000
Delivery-date: Fri, 02 Jun 2006 10:57:26 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
# 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-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [XenPPC] [xenppc-unstable] Make perfc_valuea actually return the value it reads., Xen patchbot-xenppc-unstable <=