diff options
author | Ian Jackson <ian.jackson@eu.citrix.com> | 2012-06-28 18:43:25 +0100 |
---|---|---|
committer | Ian Jackson <ian.jackson@eu.citrix.com> | 2012-06-28 18:43:25 +0100 |
commit | 145511d2ce456a6590f28e14e32b7c4cce1c4c69 (patch) | |
tree | 2ae8dc7a26b553b5fcd2f0d97ebb7bc77e5f87f0 /tools/libxl/libxl_utils.h | |
parent | 5e07d8709811cd22f7cebd68f00c9d0774b323c4 (diff) | |
download | xen-145511d2ce456a6590f28e14e32b7c4cce1c4c69.tar.gz xen-145511d2ce456a6590f28e14e32b7c4cce1c4c69.tar.bz2 xen-145511d2ce456a6590f28e14e32b7c4cce1c4c69.zip |
libxl: Add a gc to libxl_cpumap_alloc, ..._to_hex_string
In the next patch we are going to change the definition of NOGC to
require a local variable libxl__gc *gc. And this means that passing 0
to libxl__calloc is going to be wrong.
libxl_cpumap_alloc doesn't have a gc but passes 0 to libxl_calloc
Fix this by:
- introducing an `out' label and an rc variable
- replacing the returns with rc = ERROR_BLAH; goto out;
- adding uses of GC_INIT and GC_FREE.
- changing NULL to NOGC in the call to libxl__calloc
Likewise fix libxl_cpumap_to_hex_string by:
- adding a libxl_ctx* parameter and updating the one call site
- adding uses of GC_INIT and GC_FREE.
- changing NULL to NOGC in the call to libxl__zalloc
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Dario Faggioli <raistlin@linux.it>
Acked-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_utils.h')
-rw-r--r-- | tools/libxl/libxl_utils.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/libxl/libxl_utils.h b/tools/libxl/libxl_utils.h index a762734c3f..05a269a9e1 100644 --- a/tools/libxl/libxl_utils.h +++ b/tools/libxl/libxl_utils.h @@ -68,7 +68,7 @@ int libxl_cpumap_test(const libxl_cpumap *cpumap, int cpu); void libxl_cpumap_set(libxl_cpumap *cpumap, int cpu); void libxl_cpumap_reset(libxl_cpumap *cpumap, int cpu); int libxl_cpumap_count_set(const libxl_cpumap *cpumap); -char *libxl_cpumap_to_hex_string(const libxl_cpumap *cpumap); +char *libxl_cpumap_to_hex_string(libxl_ctx *ctx, const libxl_cpumap *cpumap); static inline void libxl_cpumap_set_any(libxl_cpumap *cpumap) { memset(cpumap->map, -1, cpumap->size); |