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".
diff --git a/include/types/backend.h b/include/types/backend.h
index 6798058..1e2b9df 100644
--- a/include/types/backend.h
+++ b/include/types/backend.h
@@ -158,7 +158,7 @@
int arg_opt2; /* extra option 2 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 */
- __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). */
void (*update_server_eweight)(struct server *); /* to be called after eweight change */
diff --git a/include/types/dict.h b/include/types/dict.h
index 9807816..def6355 100644
--- a/include/types/dict.h
+++ b/include/types/dict.h
@@ -13,7 +13,7 @@
struct dict {
const char *name;
struct eb_root values;
- __decl_hathreads(HA_RWLOCK_T rwlock);
+ __decl_thread(HA_RWLOCK_T rwlock);
};
#endif /* _TYPES_DICT_H */
diff --git a/include/types/dns.h b/include/types/dns.h
index 0a8bf72..f504f5f 100644
--- a/include/types/dns.h
+++ b/include/types/dns.h
@@ -197,7 +197,7 @@
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
* 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 */
};
diff --git a/include/types/listener.h b/include/types/listener.h
index 50e208e..fddabb4 100644
--- a/include/types/listener.h
+++ b/include/types/listener.h
@@ -156,7 +156,7 @@
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 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_w_ctx; /* sni_ctx tree of all known certs wildcards sorted by name */
struct tls_keys_ref *keys_ref; /* TLS ticket keys reference */
@@ -217,7 +217,7 @@
char *interface; /* interface name or NULL */
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*/
diff --git a/include/types/log.h b/include/types/log.h
index ae7ce0b..cfafb91 100644
--- a/include/types/log.h
+++ b/include/types/log.h
@@ -220,7 +220,7 @@
int minlvl;
int maxlen;
struct logsrv *ref;
- __decl_hathreads(HA_SPINLOCK_T lock);
+ __decl_thread(HA_SPINLOCK_T lock);
};
#endif /* _TYPES_LOG_H */
diff --git a/include/types/pattern.h b/include/types/pattern.h
index 1a3e076..aa3ab24 100644
--- a/include/types/pattern.h
+++ b/include/types/pattern.h
@@ -106,7 +106,7 @@
char *display; /* String displayed to identify the pattern origin. */
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. */
- __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
@@ -191,7 +191,7 @@
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 */
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
diff --git a/include/types/peers.h b/include/types/peers.h
index b3e1e44..4bd0680 100644
--- a/include/types/peers.h
+++ b/include/types/peers.h
@@ -76,7 +76,7 @@
struct shared_table *tables;
struct server *srv;
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 */
};
diff --git a/include/types/proxy.h b/include/types/proxy.h
index aa1ad35..ca642e2 100644
--- a/include/types/proxy.h
+++ b/include/types/proxy.h
@@ -271,7 +271,7 @@
* code even though they are not checks. This structure
* is as a parameter to the check code.
* Each check corresponds to a mailer */
- __decl_hathreads(HA_SPINLOCK_T lock);
+ __decl_thread(HA_SPINLOCK_T lock);
};
struct proxy {
@@ -466,7 +466,7 @@
* name is used
*/
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 {
diff --git a/include/types/ring.h b/include/types/ring.h
index f508444..b512b07 100644
--- a/include/types/ring.h
+++ b/include/types/ring.h
@@ -96,7 +96,7 @@
struct buffer buf; // storage area
size_t ofs; // absolute offset in history of the buffer's head
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;
};
diff --git a/include/types/server.h b/include/types/server.h
index 0bc5319..e4afff4 100644
--- a/include/types/server.h
+++ b/include/types/server.h
@@ -331,7 +331,7 @@
} ssl_ctx;
#endif
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 {
const char *file; /* file where the section appears */
struct eb32_node id; /* place in the tree of used IDs */
diff --git a/include/types/sink.h b/include/types/sink.h
index b10cb89..3feb05d 100644
--- a/include/types/sink.h
+++ b/include/types/sink.h
@@ -52,7 +52,7 @@
struct server *srv; // used server
struct appctx *appctx; // appctx of current session
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;
};
@@ -69,7 +69,7 @@
struct task *forward_task; // task to handle forward targets conns
struct sig_handler *forward_sighandler; /* signal handler */
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
unsigned int dropped; // dropped events since last one.
int fd; // fd num for FD type sink
diff --git a/include/types/spoe.h b/include/types/spoe.h
index 562e9f2..aa3d5d1 100644
--- a/include/types/spoe.h
+++ b/include/types/spoe.h
@@ -275,7 +275,7 @@
struct list applets; /* all SPOE applets for this agent */
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 */
- __decl_hathreads(HA_SPINLOCK_T lock);
+ __decl_thread(HA_SPINLOCK_T lock);
} *rt;
struct {
diff --git a/include/types/ssl_sock.h b/include/types/ssl_sock.h
index c8a0681..27633ec 100644
--- a/include/types/ssl_sock.h
+++ b/include/types/ssl_sock.h
@@ -161,7 +161,7 @@
union tls_sess_key *tlskeys;
int tls_ticket_enc_index;
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 */
diff --git a/include/types/stick_table.h b/include/types/stick_table.h
index 832ecd2..61ca522 100644
--- a/include/types/stick_table.h
+++ b/include/types/stick_table.h
@@ -139,7 +139,7 @@
struct stksess {
unsigned int expire; /* session expiration date */
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 upd; /* ebtree node used to hold the update sequence tree */
struct ebmb_node key; /* ebtree node used to hold the session in table */
@@ -163,7 +163,7 @@
struct eb_root exps; /* head of sticky session expiration tree */
struct eb_root updates; /* head of sticky updates sequence tree */
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 *sync_task; /* sync task */
unsigned int update;
diff --git a/include/types/task.h b/include/types/task.h
index fe945df..6515d46 100644
--- a/include/types/task.h
+++ b/include/types/task.h
@@ -64,7 +64,7 @@
struct list wake_me; /* Part of list of signals to be targeted 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 */
diff --git a/include/types/vars.h b/include/types/vars.h
index e7d71d3..62b944b 100644
--- a/include/types/vars.h
+++ b/include/types/vars.h
@@ -19,7 +19,7 @@
struct list head;
enum vars_scope scope;
unsigned int size;
- __decl_hathreads(HA_RWLOCK_T rwlock);
+ __decl_thread(HA_RWLOCK_T rwlock);
};
/* This struct describes a variable. */