Pārlūkot izejas kodu

ncd: NCDModule: use bitfields for state and error flag in NCDModuleInst. Provides a small performance boost.

ambrop7 13 gadi atpakaļ
vecāks
revīzija
4c6064a80e
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      ncd/NCDModule.h

+ 2 - 2
ncd/NCDModule.h

@@ -344,8 +344,8 @@ typedef struct NCDModuleInst_s {
     const struct NCDModule *m;
     const struct NCDModuleInst_params *params;
     void *mem;
-    int state;
-    int is_error;
+    unsigned int state:3;
+    unsigned int is_error:1;
     DebugObject d_obj;
 } NCDModuleInst;