[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 16/18] libxl: rename libxl__free_all



libxl__free_all is going to gain some extra functionality, which will
mean that the name is no longer accurate.  Rename it to
libxl__gc_cleanup.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/libxl/libxl.h          |    2 +-
 tools/libxl/libxl_internal.c |    2 +-
 tools/libxl/libxl_internal.h |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h
index 289dc85..9e8ca29 100644
--- a/tools/libxl/libxl.h
+++ b/tools/libxl/libxl.h
@@ -119,7 +119,7 @@
  *
  * No temporary objects allocated from the pool may be explicitly freed.
  * Therefore public functions which initialize a libxl__gc MUST call
- * libxl__free_all() before returning.
+ * libxl__gc_cleanup() before returning.
  */
 #ifndef LIBXL_H
 #define LIBXL_H
diff --git a/tools/libxl/libxl_internal.c b/tools/libxl/libxl_internal.c
index a2e5820..232cc4a 100644
--- a/tools/libxl/libxl_internal.c
+++ b/tools/libxl/libxl_internal.c
@@ -61,7 +61,7 @@ int libxl__ptr_add(libxl__gc *gc, void *ptr)
     return 0;
 }
 
-void libxl__free_all(libxl__gc *gc)
+void libxl__gc_cleanup(libxl__gc *gc)
 {
     void *ptr;
     int i;
diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index d015c7c..536a1ec 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -171,7 +171,7 @@ static inline libxl_ctx *libxl__gc_owner(libxl__gc *gc)
 /* register @ptr in @gc for free on exit from outermost libxl callframe. */
 _hidden int libxl__ptr_add(libxl__gc *gc, void *ptr);
 /* if this is the outermost libxl callframe then free all pointers in @gc */
-_hidden void libxl__free_all(libxl__gc *gc);
+_hidden void libxl__gc_cleanup(libxl__gc *gc);
 /* allocate and zero @bytes. (similar to a gc'd malloc(3)+memzero()) */
 _hidden void *libxl__zalloc(libxl__gc *gc, int bytes);
 /* allocate and zero memory for an array of @nmemb members of @size each.
@@ -682,7 +682,7 @@ libxl__device_model_version_running(libxl__gc *gc, uint32_t 
domid);
  */
 
 #define GC_INIT(ctx)  libxl__gc gc[1]; LIBXL_INIT_GC(gc[0],ctx)
-#define GC_FREE       libxl__free_all(gc)
+#define GC_FREE       libxl__gc_cleanup(gc)
 #define CTX           libxl__gc_owner(gc)
 
 
-- 
1.7.2.5


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.