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-changelog

[Xen-changelog] [xen-unstable] xenstore: Fix cleanup_pop() definition fo

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xenstore: Fix cleanup_pop() definition for some (buggy) pthread.h headers.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 14 May 2010 00:41:00 -0700
Delivery-date: Fri, 14 May 2010 00:44:44 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1273749676 -3600
# Node ID 9d53864d7be6d4f95b679fe0b2ef4ab898a81049
# Parent  1ec412805622fd7ec0e88bf3b7ab681d024994bc
xenstore: Fix cleanup_pop() definition for some (buggy) pthread.h headers.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/xenstore/xs.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff -r 1ec412805622 -r 9d53864d7be6 tools/xenstore/xs.c
--- a/tools/xenstore/xs.c       Thu May 13 10:09:02 2010 +0100
+++ b/tools/xenstore/xs.c       Thu May 13 12:21:16 2010 +0100
@@ -85,8 +85,14 @@ struct xs_handle {
 #define mutex_unlock(m)                pthread_mutex_unlock(m)
 #define condvar_signal(c)      pthread_cond_signal(c)
 #define condvar_wait(c,m,hnd)  pthread_cond_wait(c,m)
-#define cleanup_push(f, a)     pthread_cleanup_push((void (*)(void *))(f), 
(void *)(a))
-#define cleanup_pop(run)       pthread_cleanup_pop(run)
+#define cleanup_push(f, a)     \
+    pthread_cleanup_push((void (*)(void *))(f), (void *)(a))
+/*
+ * Some definitions of pthread_cleanup_pop() are a macro starting with an
+ * end-brace. GCC then complains if we immediately precede that with a label.
+ * Hence we insert a dummy statement to appease the compiler in this situation.
+ */
+#define cleanup_pop(run)        ((void)0); pthread_cleanup_pop(run)
 
 static void *read_thread(void *arg);
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xenstore: Fix cleanup_pop() definition for some (buggy) pthread.h headers., Xen patchbot-unstable <=