From: Wei Liu <wei.liu2@citrix.com>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: ian.jackson@eu.citrix.com, Wei Liu <wei.liu2@citrix.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH] tools: libxl: CODING_STYLE: GC* cannot be used with NOGC
Date: Fri, 16 Oct 2015 12:16:31 +0100 [thread overview]
Message-ID: <20151016111631.GP32638@zion.uk.xensource.com> (raw)
In-Reply-To: <1444994045.12442.69.camel@citrix.com>
On Fri, Oct 16, 2015 at 12:14:05PM +0100, Ian Campbell wrote:
> On Fri, 2015-10-16 at 11:39 +0100, Wei Liu wrote:
> > On Fri, Oct 16, 2015 at 11:33:12AM +0100, Ian Campbell wrote:
> > > GC* assume an existing gc in scope, which means they can't be passed
> > > NOGC. Instead recommend the use of the underlying functions with NOGC,
> > > noting that this is excepitonal.
> > >
> > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> > > ---
> > > tools/libxl/CODING_STYLE | 3 ++-
> > > 1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/tools/libxl/CODING_STYLE b/tools/libxl/CODING_STYLE
> > > index a65efb3..545dc77 100644
> > > --- a/tools/libxl/CODING_STYLE
> > > +++ b/tools/libxl/CODING_STYLE
> > > @@ -57,13 +57,14 @@ whenever they are applicable. For example:
> > > libxl__log[v] LOG, LOGE, LOGEV
> > > libxl__sprintf GCSPRINTF
> > > libxl__*alloc et al. GCNEW, GCNEW_ARRAY, GCREALLOC_ARRAY
> > > - malloc et al. GCNEW, GCNEW_ARRAY, GCREALLOC_ARRAY with
> > > NOGC
> > > isalnum etc. directly CTYPE
> > > libxl__ctx_[un]lock CTX_LOCK, CTX_UNLOCK
> > > gc=...; ao=...; EGC_GC, AO_GC, STATE_AO_GC
> > > explicit gc creation GC_INIT, GC_FREE
> > > memset(..,0,sizeof..) FILLZERO
> > >
> > > +Instead of malloc et al one should (as an exception to the above) use
> > > +libxl__{zalloc,alloc,realloc} etc but passing NOGC.
> > >
> >
> > There is no libxl__alloc. DYM libxl__malloc?
>
> I meant libxl__calloc.
>
In any case I think the basic idea gets across by "etc". So whether you
enumerate every function or not:
Acked-by: Wei Liu <wei.liu2@citrix.com>
> Ian.
next prev parent reply other threads:[~2015-10-16 11:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-16 10:33 [PATCH] tools: libxl: CODING_STYLE: GC* cannot be used with NOGC Ian Campbell
2015-10-16 10:39 ` Wei Liu
2015-10-16 11:14 ` Ian Campbell
2015-10-16 11:16 ` Wei Liu [this message]
2015-10-16 11:46 ` Ian Jackson
2015-10-22 15:54 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151016111631.GP32638@zion.uk.xensource.com \
--to=wei.liu2@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.