haproxy/include/types/vars.h
Willy Tarreau af613e8359 CLEANUP: thread: rename __decl_hathreads() to __decl_thread()
I can never figure whether it takes an "s" or not, and in the end it's
better if it matches the file's naming, so let's call it "__decl_thread".
2020-06-11 10:18:56 +02:00

37 lines
667 B
C

#ifndef _TYPES_VARS_H
#define _TYPES_VARS_H
#include <haproxy/list-t.h>
#include <haproxy/thread.h>
#include <types/sample.h>
enum vars_scope {
SCOPE_SESS = 0,
SCOPE_TXN,
SCOPE_REQ,
SCOPE_RES,
SCOPE_PROC,
SCOPE_CHECK,
};
struct vars {
struct list head;
enum vars_scope scope;
unsigned int size;
__decl_thread(HA_RWLOCK_T rwlock);
};
/* This struct describes a variable. */
struct var_desc {
const char *name; /* Contains the normalized variable name. */
enum vars_scope scope;
};
struct var {
struct list l; /* Used for chaining vars. */
const char *name; /* Contains the variable name. */
struct sample_data data; /* data storage. */
};
#endif