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".
This commit is contained in:
Willy Tarreau 2020-06-05 08:40:51 +02:00
parent 3f567e4949
commit af613e8359
34 changed files with 45 additions and 45 deletions

View File

@ -45,7 +45,7 @@ struct buffer_wait {
extern struct pool_head *pool_head_buffer; extern struct pool_head *pool_head_buffer;
extern struct mt_list buffer_wq; extern struct mt_list buffer_wq;
__decl_hathreads(extern HA_SPINLOCK_T buffer_wq_lock); __decl_thread(extern HA_SPINLOCK_T buffer_wq_lock);
int init_buffer(); int init_buffer();
void buffer_dump(FILE *o, struct buffer *b, int from, int to); void buffer_dump(FILE *o, struct buffer *b, int from, int to);

View File

@ -87,7 +87,7 @@ struct pool_head {
#ifdef CONFIG_HAP_LOCKLESS_POOLS #ifdef CONFIG_HAP_LOCKLESS_POOLS
uintptr_t seq; uintptr_t seq;
#endif #endif
__decl_hathreads(HA_SPINLOCK_T lock); /* the spin lock */ __decl_thread(HA_SPINLOCK_T lock); /* the spin lock */
unsigned int used; /* how many chunks are currently in use */ unsigned int used; /* how many chunks are currently in use */
unsigned int needed_avg;/* floating indicator between used and allocated */ unsigned int needed_avg;/* floating indicator between used and allocated */
unsigned int allocated; /* how many chunks have been allocated */ unsigned int allocated; /* how many chunks have been allocated */

View File

@ -44,7 +44,7 @@
#define MAX_THREADS_MASK 1 #define MAX_THREADS_MASK 1
/* These macros allow to make some struct fields or local variables optional */ /* These macros allow to make some struct fields or local variables optional */
#define __decl_hathreads(decl) #define __decl_thread(decl)
#define __decl_spinlock(lock) #define __decl_spinlock(lock)
#define __decl_aligned_spinlock(lock) #define __decl_aligned_spinlock(lock)
#define __decl_rwlock(lock) #define __decl_rwlock(lock)
@ -62,7 +62,7 @@
#define MAX_THREADS_MASK (~0UL >> (LONGBITS - MAX_THREADS)) #define MAX_THREADS_MASK (~0UL >> (LONGBITS - MAX_THREADS))
#define __decl_hathreads(decl) decl #define __decl_thread(decl) decl
/* declare a self-initializing spinlock */ /* declare a self-initializing spinlock */
#define __decl_spinlock(lock) \ #define __decl_spinlock(lock) \
@ -97,7 +97,7 @@
* the pthread identifier which does not exist). * the pthread identifier which does not exist).
*/ */
struct thread_info { struct thread_info {
__decl_hathreads(pthread_t pthread); __decl_thread(pthread_t pthread);
clockid_t clock_id; clockid_t clock_id;
timer_t wd_timer; /* valid timer or TIMER_INVALID if not set */ timer_t wd_timer; /* valid timer or TIMER_INVALID if not set */
uint64_t prev_cpu_time; /* previous per thread CPU time */ uint64_t prev_cpu_time; /* previous per thread CPU time */

View File

@ -73,7 +73,7 @@ int conn_recv_socks4_proxy_response(struct connection *conn);
/* If we delayed the mux creation because we were waiting for the handshake, do it now */ /* If we delayed the mux creation because we were waiting for the handshake, do it now */
int conn_create_mux(struct connection *conn); int conn_create_mux(struct connection *conn);
__decl_hathreads(extern HA_SPINLOCK_T toremove_lock[MAX_THREADS]); __decl_thread(extern HA_SPINLOCK_T toremove_lock[MAX_THREADS]);
/* returns true is the transport layer is ready */ /* returns true is the transport layer is ready */
static inline int conn_xprt_ready(const struct connection *conn) static inline int conn_xprt_ready(const struct connection *conn)

View File

@ -67,7 +67,7 @@ void fd_remove(int fd);
int fd_takeover(int fd, void *expected_owner); int fd_takeover(int fd, void *expected_owner);
#ifndef HA_HAVE_CAS_DW #ifndef HA_HAVE_CAS_DW
__decl_hathreads(extern HA_RWLOCK_T fd_mig_lock); __decl_thread(extern HA_RWLOCK_T fd_mig_lock);
#endif #endif
ssize_t fd_write_frag_line(int fd, size_t maxlen, const struct ist pfx[], size_t npfx, const struct ist msg[], size_t nmsg, int nl); ssize_t fd_write_frag_line(int fd, size_t maxlen, const struct ist pfx[], size_t npfx, const struct ist msg[], size_t nmsg, int nl);

View File

@ -27,7 +27,7 @@
#include <types/protocol.h> #include <types/protocol.h>
extern struct protocol *__protocol_by_family[AF_CUST_MAX]; extern struct protocol *__protocol_by_family[AF_CUST_MAX];
__decl_hathreads(extern HA_SPINLOCK_T proto_lock); __decl_thread(extern HA_SPINLOCK_T proto_lock);
/* Registers the protocol <proto> */ /* Registers the protocol <proto> */
void protocol_register(struct protocol *proto); void protocol_register(struct protocol *proto);

View File

@ -37,7 +37,7 @@
#include <proto/freq_ctr.h> #include <proto/freq_ctr.h>
__decl_hathreads(extern HA_SPINLOCK_T idle_conn_srv_lock); __decl_thread(extern HA_SPINLOCK_T idle_conn_srv_lock);
extern struct eb_root idle_conn_srv; extern struct eb_root idle_conn_srv;
extern struct task *idle_conn_task; extern struct task *idle_conn_task;
extern struct task *idle_conn_cleanup[MAX_THREADS]; extern struct task *idle_conn_cleanup[MAX_THREADS];

View File

@ -21,7 +21,7 @@
extern int signal_queue_len; extern int signal_queue_len;
extern struct signal_descriptor signal_state[]; extern struct signal_descriptor signal_state[];
__decl_hathreads(extern HA_SPINLOCK_T signals_lock); __decl_thread(extern HA_SPINLOCK_T signals_lock);
void signal_handler(int sig); void signal_handler(int sig);
void __signal_process_queue(); void __signal_process_queue();

View File

@ -41,7 +41,7 @@ extern int sctl_ex_index;
extern struct global_ssl global_ssl; extern struct global_ssl global_ssl;
extern struct ssl_bind_kw ssl_bind_kws[]; extern struct ssl_bind_kw ssl_bind_kws[];
extern struct methodVersions methodVersions[]; extern struct methodVersions methodVersions[];
__decl_hathreads(extern HA_SPINLOCK_T ckch_lock); __decl_thread(extern HA_SPINLOCK_T ckch_lock);
extern struct pool_head *pool_head_ssl_capture; extern struct pool_head *pool_head_ssl_capture;
extern unsigned int openssl_engines_initialized; extern unsigned int openssl_engines_initialized;
extern int nb_engines; extern int nb_engines;

View File

@ -102,8 +102,8 @@ extern int global_rqueue_size; /* Number of element sin the global runqueue */
extern struct task_per_thread task_per_thread[MAX_THREADS]; extern struct task_per_thread task_per_thread[MAX_THREADS];
__decl_hathreads(extern HA_SPINLOCK_T rq_lock); /* spin lock related to run queue */ __decl_thread(extern HA_SPINLOCK_T rq_lock); /* spin lock related to run queue */
__decl_hathreads(extern HA_RWLOCK_T wq_lock); /* RW lock related to the wait queue */ __decl_thread(extern HA_RWLOCK_T wq_lock); /* RW lock related to the wait queue */
static inline struct task *task_unlink_wq(struct task *t); static inline struct task *task_unlink_wq(struct task *t);
static inline void task_queue(struct task *task); static inline void task_queue(struct task *task);

View File

@ -158,7 +158,7 @@ struct lbprm {
int arg_opt2; /* extra option 2 for the LB algo (algo-specific) */ int arg_opt2; /* extra option 2 for the LB algo (algo-specific) */
int arg_opt3; /* extra option 3 for the LB algo (algo-specific) */ int arg_opt3; /* extra option 3 for the LB algo (algo-specific) */
struct server *fbck; /* first backup server when !PR_O_USE_ALL_BK, or NULL */ struct server *fbck; /* first backup server when !PR_O_USE_ALL_BK, or NULL */
__decl_hathreads(HA_SPINLOCK_T lock); __decl_thread(HA_SPINLOCK_T lock);
/* Call backs for some actions. Any of them may be NULL (thus should be ignored). */ /* Call backs for some actions. Any of them may be NULL (thus should be ignored). */
void (*update_server_eweight)(struct server *); /* to be called after eweight change */ void (*update_server_eweight)(struct server *); /* to be called after eweight change */

View File

@ -13,7 +13,7 @@ struct dict_entry {
struct dict { struct dict {
const char *name; const char *name;
struct eb_root values; struct eb_root values;
__decl_hathreads(HA_RWLOCK_T rwlock); __decl_thread(HA_RWLOCK_T rwlock);
}; };
#endif /* _TYPES_DICT_H */ #endif /* _TYPES_DICT_H */

View File

@ -197,7 +197,7 @@ struct dns_resolvers {
struct eb_root query_ids; /* tree to quickly lookup/retrieve query ids currently in use struct eb_root query_ids; /* tree to quickly lookup/retrieve query ids currently in use
* used by each nameserver, but stored in resolvers since there must * used by each nameserver, but stored in resolvers since there must
* be a unique relation between an eb_root and an eb_node (resolution) */ * be a unique relation between an eb_root and an eb_node (resolution) */
__decl_hathreads(HA_SPINLOCK_T lock); __decl_thread(HA_SPINLOCK_T lock);
struct list list; /* resolvers list */ struct list list; /* resolvers list */
}; };

View File

@ -156,7 +156,7 @@ struct bind_conf {
struct ssl_bind_conf *default_ssl_conf; /* custom SSL conf of default_ctx */ struct ssl_bind_conf *default_ssl_conf; /* custom SSL conf of default_ctx */
int strict_sni; /* refuse negotiation if sni doesn't match a certificate */ int strict_sni; /* refuse negotiation if sni doesn't match a certificate */
int ssl_options; /* ssl options */ int ssl_options; /* ssl options */
__decl_hathreads(HA_RWLOCK_T sni_lock); /* lock the SNI trees during add/del operations */ __decl_thread(HA_RWLOCK_T sni_lock); /* lock the SNI trees during add/del operations */
struct eb_root sni_ctx; /* sni_ctx tree of all known certs full-names sorted by name */ struct eb_root sni_ctx; /* sni_ctx tree of all known certs full-names sorted by name */
struct eb_root sni_w_ctx; /* sni_ctx tree of all known certs wildcards sorted by name */ struct eb_root sni_w_ctx; /* sni_ctx tree of all known certs wildcards sorted by name */
struct tls_keys_ref *keys_ref; /* TLS ticket keys reference */ struct tls_keys_ref *keys_ref; /* TLS ticket keys reference */
@ -217,7 +217,7 @@ struct listener {
char *interface; /* interface name or NULL */ char *interface; /* interface name or NULL */
char *name; /* listener's name */ char *name; /* listener's name */
__decl_hathreads(HA_SPINLOCK_T lock); __decl_thread(HA_SPINLOCK_T lock);
const struct netns_entry *netns; /* network namespace of the listener*/ const struct netns_entry *netns; /* network namespace of the listener*/

View File

@ -220,7 +220,7 @@ struct logsrv {
int minlvl; int minlvl;
int maxlen; int maxlen;
struct logsrv *ref; struct logsrv *ref;
__decl_hathreads(HA_SPINLOCK_T lock); __decl_thread(HA_SPINLOCK_T lock);
}; };
#endif /* _TYPES_LOG_H */ #endif /* _TYPES_LOG_H */

View File

@ -106,7 +106,7 @@ struct pat_ref {
char *display; /* String displayed to identify the pattern origin. */ char *display; /* String displayed to identify the pattern origin. */
struct list head; /* The head of the list of struct pat_ref_elt. */ struct list head; /* The head of the list of struct pat_ref_elt. */
struct list pat; /* The head of the list of struct pattern_expr. */ struct list pat; /* The head of the list of struct pattern_expr. */
__decl_hathreads(HA_SPINLOCK_T lock); /* Lock used to protect pat ref elements */ __decl_thread(HA_SPINLOCK_T lock); /* Lock used to protect pat ref elements */
}; };
/* This is a part of struct pat_ref. Each entry contain one /* This is a part of struct pat_ref. Each entry contain one
@ -191,7 +191,7 @@ struct pattern_expr {
struct eb_root pattern_tree; /* may be used for lookup in large datasets */ struct eb_root pattern_tree; /* may be used for lookup in large datasets */
struct eb_root pattern_tree_2; /* may be used for different types */ struct eb_root pattern_tree_2; /* may be used for different types */
int mflags; /* flags relative to the parsing or matching method. */ int mflags; /* flags relative to the parsing or matching method. */
__decl_hathreads(HA_RWLOCK_T lock); /* lock used to protect patterns */ __decl_thread(HA_RWLOCK_T lock); /* lock used to protect patterns */
}; };
/* This is a list of expression. A struct pattern_expr can be used by /* This is a list of expression. A struct pattern_expr can be used by

View File

@ -76,7 +76,7 @@ struct peer {
struct shared_table *tables; struct shared_table *tables;
struct server *srv; struct server *srv;
struct dcache *dcache; /* dictionary cache */ struct dcache *dcache; /* dictionary cache */
__decl_hathreads(HA_SPINLOCK_T lock); /* lock used to handle this peer section */ __decl_thread(HA_SPINLOCK_T lock); /* lock used to handle this peer section */
struct peer *next; /* next peer in the list */ struct peer *next; /* next peer in the list */
}; };

View File

@ -271,7 +271,7 @@ struct email_alertq {
* code even though they are not checks. This structure * code even though they are not checks. This structure
* is as a parameter to the check code. * is as a parameter to the check code.
* Each check corresponds to a mailer */ * Each check corresponds to a mailer */
__decl_hathreads(HA_SPINLOCK_T lock); __decl_thread(HA_SPINLOCK_T lock);
}; };
struct proxy { struct proxy {
@ -466,7 +466,7 @@ struct proxy {
* name is used * name is used
*/ */
struct list filter_configs; /* list of the filters that are declared on this proxy */ struct list filter_configs; /* list of the filters that are declared on this proxy */
__decl_hathreads(HA_SPINLOCK_T lock); /* may be taken under the server's lock */ __decl_thread(HA_SPINLOCK_T lock); /* may be taken under the server's lock */
}; };
struct switching_rule { struct switching_rule {

View File

@ -96,7 +96,7 @@ struct ring {
struct buffer buf; // storage area struct buffer buf; // storage area
size_t ofs; // absolute offset in history of the buffer's head size_t ofs; // absolute offset in history of the buffer's head
struct list waiters; // list of waiters, for now, CLI "show event" struct list waiters; // list of waiters, for now, CLI "show event"
__decl_hathreads(HA_RWLOCK_T lock); __decl_thread(HA_RWLOCK_T lock);
int readers_count; int readers_count;
}; };

View File

@ -331,7 +331,7 @@ struct server {
} ssl_ctx; } ssl_ctx;
#endif #endif
struct dns_srvrq *srvrq; /* Pointer representing the DNS SRV requeest, if any */ struct dns_srvrq *srvrq; /* Pointer representing the DNS SRV requeest, if any */
__decl_hathreads(HA_SPINLOCK_T lock); /* may enclose the proxy's lock, must not be taken under */ __decl_thread(HA_SPINLOCK_T lock); /* may enclose the proxy's lock, must not be taken under */
struct { struct {
const char *file; /* file where the section appears */ const char *file; /* file where the section appears */
struct eb32_node id; /* place in the tree of used IDs */ struct eb32_node id; /* place in the tree of used IDs */

View File

@ -52,7 +52,7 @@ struct sink_forward_target {
struct server *srv; // used server struct server *srv; // used server
struct appctx *appctx; // appctx of current session struct appctx *appctx; // appctx of current session
size_t ofs; // ring buffer reader offset size_t ofs; // ring buffer reader offset
__decl_hathreads(HA_SPINLOCK_T lock); // lock to protect current struct __decl_thread(HA_SPINLOCK_T lock); // lock to protect current struct
struct sink_forward_target *next; struct sink_forward_target *next;
}; };
@ -69,7 +69,7 @@ struct sink {
struct task *forward_task; // task to handle forward targets conns struct task *forward_task; // task to handle forward targets conns
struct sig_handler *forward_sighandler; /* signal handler */ struct sig_handler *forward_sighandler; /* signal handler */
struct { struct {
__decl_hathreads(HA_RWLOCK_T lock); // shared/excl for dropped __decl_thread(HA_RWLOCK_T lock); // shared/excl for dropped
struct ring *ring; // used by ring buffer and STRM sender struct ring *ring; // used by ring buffer and STRM sender
unsigned int dropped; // dropped events since last one. unsigned int dropped; // dropped events since last one.
int fd; // fd num for FD type sink int fd; // fd num for FD type sink

View File

@ -275,7 +275,7 @@ struct spoe_agent {
struct list applets; /* all SPOE applets for this agent */ struct list applets; /* all SPOE applets for this agent */
struct list sending_queue; /* Queue of streams waiting to send data */ struct list sending_queue; /* Queue of streams waiting to send data */
struct list waiting_queue; /* Queue of streams waiting for a ack, in async mode */ struct list waiting_queue; /* Queue of streams waiting for a ack, in async mode */
__decl_hathreads(HA_SPINLOCK_T lock); __decl_thread(HA_SPINLOCK_T lock);
} *rt; } *rt;
struct { struct {

View File

@ -161,7 +161,7 @@ struct tls_keys_ref {
union tls_sess_key *tlskeys; union tls_sess_key *tlskeys;
int tls_ticket_enc_index; int tls_ticket_enc_index;
int key_size_bits; int key_size_bits;
__decl_hathreads(HA_RWLOCK_T lock); /* lock used to protect the ref */ __decl_thread(HA_RWLOCK_T lock); /* lock used to protect the ref */
}; };
/* shared ssl session */ /* shared ssl session */

View File

@ -139,7 +139,7 @@ extern struct stktable_type stktable_types[];
struct stksess { struct stksess {
unsigned int expire; /* session expiration date */ unsigned int expire; /* session expiration date */
unsigned int ref_cnt; /* reference count, can only purge when zero */ unsigned int ref_cnt; /* reference count, can only purge when zero */
__decl_hathreads(HA_RWLOCK_T lock); /* lock related to the table entry */ __decl_thread(HA_RWLOCK_T lock); /* lock related to the table entry */
struct eb32_node exp; /* ebtree node used to hold the session in expiration tree */ struct eb32_node exp; /* ebtree node used to hold the session in expiration tree */
struct eb32_node upd; /* ebtree node used to hold the update sequence tree */ struct eb32_node upd; /* ebtree node used to hold the update sequence tree */
struct ebmb_node key; /* ebtree node used to hold the session in table */ struct ebmb_node key; /* ebtree node used to hold the session in table */
@ -163,7 +163,7 @@ struct stktable {
struct eb_root exps; /* head of sticky session expiration tree */ struct eb_root exps; /* head of sticky session expiration tree */
struct eb_root updates; /* head of sticky updates sequence tree */ struct eb_root updates; /* head of sticky updates sequence tree */
struct pool_head *pool; /* pool used to allocate sticky sessions */ struct pool_head *pool; /* pool used to allocate sticky sessions */
__decl_hathreads(HA_SPINLOCK_T lock); /* spin lock related to the table */ __decl_thread(HA_SPINLOCK_T lock); /* spin lock related to the table */
struct task *exp_task; /* expiration task */ struct task *exp_task; /* expiration task */
struct task *sync_task; /* sync task */ struct task *sync_task; /* sync task */
unsigned int update; unsigned int update;

View File

@ -64,7 +64,7 @@ struct notification {
struct list wake_me; /* Part of list of signals to be targeted if an struct list wake_me; /* Part of list of signals to be targeted if an
event occurs. */ event occurs. */
struct task *task; /* The task to be wake if an event occurs. */ struct task *task; /* The task to be wake if an event occurs. */
__decl_hathreads(HA_SPINLOCK_T lock); __decl_thread(HA_SPINLOCK_T lock);
}; };
/* force to split per-thread stuff into separate cache lines */ /* force to split per-thread stuff into separate cache lines */

View File

@ -19,7 +19,7 @@ struct vars {
struct list head; struct list head;
enum vars_scope scope; enum vars_scope scope;
unsigned int size; unsigned int size;
__decl_hathreads(HA_RWLOCK_T rwlock); __decl_thread(HA_RWLOCK_T rwlock);
}; };
/* This struct describes a variable. */ /* This struct describes a variable. */

View File

@ -44,7 +44,7 @@ struct userlist *userlist = NULL; /* list of all existing userlists */
static THREAD_LOCAL struct crypt_data crypt_data = { .initialized = 0 }; static THREAD_LOCAL struct crypt_data crypt_data = { .initialized = 0 };
#else #else
/* lock for crypt() */ /* lock for crypt() */
__decl_hathreads(static HA_SPINLOCK_T auth_lock); __decl_thread(static HA_SPINLOCK_T auth_lock);
#endif #endif
#endif #endif

View File

@ -335,7 +335,7 @@ static void fd_dodelete(int fd, int do_close)
} }
#ifndef HA_HAVE_CAS_DW #ifndef HA_HAVE_CAS_DW
__decl_hathreads(__decl_rwlock(fd_mig_lock)); __decl_thread(__decl_rwlock(fd_mig_lock));
#endif #endif
/* /*

View File

@ -2949,8 +2949,8 @@ static void *run_thread_poll_loop(void *data)
struct per_thread_deinit_fct *ptdf; struct per_thread_deinit_fct *ptdf;
struct per_thread_free_fct *ptff; struct per_thread_free_fct *ptff;
static int init_left = 0; static int init_left = 0;
__decl_hathreads(static pthread_mutex_t init_mutex = PTHREAD_MUTEX_INITIALIZER); __decl_thread(static pthread_mutex_t init_mutex = PTHREAD_MUTEX_INITIALIZER);
__decl_hathreads(static pthread_cond_t init_cond = PTHREAD_COND_INITIALIZER); __decl_thread(static pthread_cond_t init_cond = PTHREAD_COND_INITIALIZER);
ha_set_tid((unsigned long)data); ha_set_tid((unsigned long)data);
sched = &task_per_thread[tid]; sched = &task_per_thread[tid];

View File

@ -735,7 +735,7 @@ void listener_accept(int fd)
struct sockaddr_storage addr; struct sockaddr_storage addr;
socklen_t laddr = sizeof(addr); socklen_t laddr = sizeof(addr);
unsigned int count; unsigned int count;
__decl_hathreads(unsigned long mask); __decl_thread(unsigned long mask);
/* pre-increase the number of connections without going too far. /* pre-increase the number of connections without going too far.
* We process the listener, then the proxy, then the process. * We process the listener, then the proxy, then the process.

View File

@ -600,7 +600,7 @@ INITCALL1(STG_REGISTER, cli_register_kw, &cli_kws);
#define MEM_FAIL_MAX_STR 128 #define MEM_FAIL_MAX_STR 128
static int mem_fail_cur_idx; static int mem_fail_cur_idx;
static char mem_fail_str[MEM_FAIL_MAX_CHAR * MEM_FAIL_MAX_STR]; static char mem_fail_str[MEM_FAIL_MAX_CHAR * MEM_FAIL_MAX_STR];
__decl_hathreads(static HA_SPINLOCK_T mem_fail_lock); __decl_thread(static HA_SPINLOCK_T mem_fail_lock);
int mem_should_fail(const struct pool_head *pool) int mem_should_fail(const struct pool_head *pool)
{ {

View File

@ -61,12 +61,12 @@ static struct srv_kw_list srv_keywords = {
.list = LIST_HEAD_INIT(srv_keywords.list) .list = LIST_HEAD_INIT(srv_keywords.list)
}; };
__decl_hathreads(HA_SPINLOCK_T idle_conn_srv_lock); __decl_thread(HA_SPINLOCK_T idle_conn_srv_lock);
struct eb_root idle_conn_srv = EB_ROOT; struct eb_root idle_conn_srv = EB_ROOT;
struct task *idle_conn_task = NULL; struct task *idle_conn_task = NULL;
struct task *idle_conn_cleanup[MAX_THREADS] = { NULL }; struct task *idle_conn_cleanup[MAX_THREADS] = { NULL };
struct mt_list toremove_connections[MAX_THREADS]; struct mt_list toremove_connections[MAX_THREADS];
__decl_hathreads(HA_SPINLOCK_T toremove_lock[MAX_THREADS]); __decl_thread(HA_SPINLOCK_T toremove_lock[MAX_THREADS]);
/* The server names dictionary */ /* The server names dictionary */
struct dict server_name_dict = { struct dict server_name_dict = {

View File

@ -272,7 +272,7 @@ static int ssl_locking_init(void)
#endif #endif
__decl_hathreads(HA_SPINLOCK_T ckch_lock); __decl_thread(HA_SPINLOCK_T ckch_lock);
/* /*

View File

@ -162,7 +162,7 @@ void wake_expired_tasks()
struct task_per_thread * const tt = sched; // thread's tasks struct task_per_thread * const tt = sched; // thread's tasks
struct task *task; struct task *task;
struct eb32_node *eb; struct eb32_node *eb;
__decl_hathreads(int key); __decl_thread(int key);
while (1) { while (1) {
lookup_next_local: lookup_next_local:
@ -284,7 +284,7 @@ int next_timer_expiry()
struct task_per_thread * const tt = sched; // thread's tasks struct task_per_thread * const tt = sched; // thread's tasks
struct eb32_node *eb; struct eb32_node *eb;
int ret = TICK_ETERNITY; int ret = TICK_ETERNITY;
__decl_hathreads(int key); __decl_thread(int key);
/* first check in the thread-local timers */ /* first check in the thread-local timers */
eb = eb32_lookup_ge(&tt->timers, now_ms - TIMER_LOOK_BACK); eb = eb32_lookup_ge(&tt->timers, now_ms - TIMER_LOOK_BACK);