1 #ifndef _TYPES_VARS_H 2 #define _TYPES_VARS_H 3 4 #include <common/mini-clist.h> 5 #include <common/hathreads.h> 6 7 #include <types/sample.h> 8 9 enum vars_scope { 10 SCOPE_SESS = 0, 11 SCOPE_TXN, 12 SCOPE_REQ, 13 SCOPE_RES, 14 SCOPE_PROC, 15 }; 16 17 struct vars { 18 struct list head; 19 enum vars_scope scope; 20 unsigned int size; 21 __decl_hathreads(HA_RWLOCK_T rwlock); 22 }; 23 24 /* This struct describes a variable. */ 25 struct var_desc { 26 const char *name; /* Contains the normalized variable name. */ 27 enum vars_scope scope; 28 }; 29 30 struct var { 31 struct list l; /* Used for chaining vars. */ 32 const char *name; /* Contains the variable name. */ 33 struct sample_data data; /* data storage. */ 34 }; 35 36 #endif 37