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

Re: [Xen-devel] [PATCH 11/20] libxl: Introduce some convenience macros

Ian Campbell writes ("Re: [Xen-devel] [PATCH 11/20] libxl: Introduce some 
convenience macros"):
> On Fri, 2012-03-16 at 16:26 +0000, Ian Jackson wrote:
> > We introduce:
> >    <type> *GCNEW(<type> *var);
> >    <type> *GCNEW_ARRAY(<type> *var, ssize_t nmemb);
> >    <type> *GCREALLOC_ARRAY(<type> *var, size_t nmemb);
> >    char *GCSPRINTF(const char *fmt, ...);
> >    void LOG(<xtl_level_suffix>, const char *fmt, ...);
> >    void LOGE(<xtl_level_suffix>, const char *fmt, ...);
> >    void LOGEV(<xtl_level_suffix>, int errnoval, const char *fmt, ...);
> > all of which expect, in the calling context,
> >    libxl__gc *gc;
> All of these get used later in the series?

Many of them do.  I'm not sure I use all of the LOG* family but
they're orthogonally necessary.

I supplied GCREALLOC_ARRAY because it seemed to fit in with the family
which had malloc and an array malloc.  It doesn't have a caller yet
even in my tip; there's a potential call site in libxl_qmp.c but if
that's not enough to justify it I can take it out for now.


Xen-devel mailing list



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