mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-03 20:39:41 -05:00
This splits the hathreads.h file into types+macros and functions. Given that most users of this file used to include it only to get the definition of THREAD_LOCAL and MAXTHREADS, the bare minimum was placed into thread-t.h (i.e. types and macros). All the thread management was left to haproxy/thread.h. It's worth noting the drop of the trailing "s" in the name, to remove the permanent confusion that arises between this one and the system implementation (no "s") and the makefile's option (no "s"). For consistency, src/hathreads.c was also renamed thread.c. A number of files were updated to only include thread-t which is the one they really needed. Some future improvements are possible like replacing empty inlined functions with macros for the thread-less case, as building at -O0 disables inlining and causes these ones to be emitted. But this really is cosmetic.
19 lines
316 B
C
19 lines
316 B
C
#ifndef _TYPES_DICT_H
|
|
#define _TYPES_DICT_H
|
|
|
|
#include <haproxy/thread.h>
|
|
#include <import/ebpttree.h>
|
|
|
|
struct dict_entry {
|
|
struct ebpt_node value;
|
|
unsigned int refcount;
|
|
size_t len;
|
|
};
|
|
|
|
struct dict {
|
|
const char *name;
|
|
struct eb_root values;
|
|
__decl_hathreads(HA_RWLOCK_T rwlock);
|
|
};
|
|
|
|
#endif /* _TYPES_DICT_H */
|