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

[Xen-changelog] [xen master] tools: libxl: CODING_STYLE: GC* cannot be used with NOGC



commit 8b7df8e8079995b3b9431084f77fe2526eb4ef18
Author:     Ian Campbell <ian.campbell@xxxxxxxxxx>
AuthorDate: Fri Oct 16 11:33:12 2015 +0100
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Thu Oct 22 16:07:43 2015 +0100

    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 <ian.campbell@xxxxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
    [ ijc -- refer to libxl__calloc not (nonexistent) libxl__alloc ]
---
 tools/libxl/CODING_STYLE |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/CODING_STYLE b/tools/libxl/CODING_STYLE
index a65efb3..919bcc6 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
 --------------
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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