Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Xen: Devel
[PATCH 14/27] libxl: Allow AO_GC and EGC_GC even if not used
 

Index | Next | Previous | View Flat


ian.jackson at eu

May 11, 2012, 10:57 AM


Views: 39
Permalink
[PATCH 14/27] libxl: Allow AO_GC and EGC_GC even if not used

Mark the gc produced by AO_GC and EGC_GC with the gcc feature
__attribute__((unused)). This allows the use of EGC_INIT and
STATE_AO_GC by functions which do actually use the gc.

This is convenient because those functions might want to use the ao or
egc, rather than the gc; and also because it means that functions
which morally ought to be fishing any gc they use out of an egc or
state structure can be written do so regardless of whether the gc is
actually used right then.

Signed-off-by: Ian Jackson <ian.jackson [at] eu>
Acked-by: Ian Campbell <ian.campbell [at] citrix>
---
tools/libxl/libxl_internal.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index c5ec586..21fe99c 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -1287,7 +1287,7 @@ libxl__device_model_version_running(libxl__gc *gc, uint32_t domid);
/* useful for all functions which take an egc: */

#define EGC_GC \
- libxl__gc *const gc = &egc->gc
+ libxl__gc *const gc __attribute__((unused)) = &egc->gc

/* egc initialisation and destruction: */

@@ -1390,7 +1390,7 @@ _hidden void libxl__egc_cleanup(libxl__egc *egc);
})

#define AO_GC \
- libxl__gc *const gc = &ao->gc
+ libxl__gc *const gc __attribute__((unused)) = &ao->gc

#define STATE_AO_GC(op_ao) \
libxl__ao *const ao = (op_ao); \
--
1.7.2.5


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel

Subject User Time
[PATCH 14/27] libxl: Allow AO_GC and EGC_GC even if not used ian.jackson at eu May 11, 2012, 10:57 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.