|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH V4 16/24] libxl: copy function for builtin types
Ian Campbell writes ("Re: [PATCH V4 16/24] libxl: copy function for builtin
types"):
> On Thu, 2014-05-01 at 13:58 +0100, Wei Liu wrote:
> > +typedef struct libxl__ctx libxl_ctx;
> > +
> > int libxl_uuid_is_nil(libxl_uuid *uuid);
> > void libxl_uuid_generate(libxl_uuid *uuid);
> > int libxl_uuid_from_string(libxl_uuid *uuid, const char *in);
> > void libxl_uuid_copy(libxl_uuid *dst, const libxl_uuid *src);
> > +void libxl_uuid_copy_ctx(libxl_ctx *ctx, libxl_uuid *dst,
> > + const libxl_uuid *src);
>
> Hrm, this is rather unfortunate.
>
> All of these only take a ctx so they can use NOGC. I wonder if a #define
> INIT_NOGC which provides a suitable gc (with maxsize == -1) might be
> nicer than this?
The problem with this is that the caller's log functions won't be
respected. I think it would be better to make all of the copy
functions take a ctx.
Alternatively we should at least document this restriction, but also
then we shouldn't ever call the copy functions from within libxl which
(without reading the rest of the series) I think would probably defeat
the point.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |