From: Ian Campbell Date: Fri, 16 Oct 2015 10:33:12 +0000 (+0100) Subject: tools: libxl: CODING_STYLE: GC* cannot be used with NOGC X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~2364 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8b7df8e8079995b3b9431084f77fe2526eb4ef18;p=xen.git tools: libxl: CODING_STYLE: GC* cannot be used with NOGC 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 Acked-by: Wei Liu Acked-by: Ian Jackson [ ijc -- refer to libxl__calloc not (nonexistent) libxl__alloc ] --- diff --git a/tools/libxl/CODING_STYLE b/tools/libxl/CODING_STYLE index a65efb3f6f..919bcc636c 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,calloc,realloc} etc but passing NOGC. ERROR HANDLING --------------