mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-29 23:01:03 +01:00
BUG/MINOR: threads: Add missing THREAD_LOCAL on static here and there
This commit is contained in:
parent
cd7879adc2
commit
1bc04c7664
@ -2380,7 +2380,7 @@ static int start_checks()
|
|||||||
*/
|
*/
|
||||||
static int httpchk_expect(struct server *s, int done)
|
static int httpchk_expect(struct server *s, int done)
|
||||||
{
|
{
|
||||||
static char status_msg[] = "HTTP status check returned code <000>";
|
static THREAD_LOCAL char status_msg[] = "HTTP status check returned code <000>";
|
||||||
char status_code[] = "000";
|
char status_code[] = "000";
|
||||||
char *contentptr;
|
char *contentptr;
|
||||||
int crlf;
|
int crlf;
|
||||||
|
|||||||
@ -81,7 +81,7 @@ static const char stats_permission_denied_msg[] =
|
|||||||
"";
|
"";
|
||||||
|
|
||||||
|
|
||||||
static char *dynamic_usage_msg = NULL;
|
static THREAD_LOCAL char *dynamic_usage_msg = NULL;
|
||||||
|
|
||||||
/* List head of cli keywords */
|
/* List head of cli keywords */
|
||||||
static struct cli_kw_list cli_keywords = {
|
static struct cli_kw_list cli_keywords = {
|
||||||
|
|||||||
@ -267,7 +267,7 @@ struct action_kw_list http_res_keywords = {
|
|||||||
struct chunk http_err_chunks[HTTP_ERR_SIZE];
|
struct chunk http_err_chunks[HTTP_ERR_SIZE];
|
||||||
|
|
||||||
/* this struct is used between calls to smp_fetch_hdr() or smp_fetch_cookie() */
|
/* this struct is used between calls to smp_fetch_hdr() or smp_fetch_cookie() */
|
||||||
static struct hdr_ctx static_hdr_ctx;
|
static THREAD_LOCAL struct hdr_ctx static_hdr_ctx;
|
||||||
|
|
||||||
#define FD_SETS_ARE_BITFIELDS
|
#define FD_SETS_ARE_BITFIELDS
|
||||||
#ifdef FD_SETS_ARE_BITFIELDS
|
#ifdef FD_SETS_ARE_BITFIELDS
|
||||||
|
|||||||
@ -116,8 +116,8 @@ static struct protocol proto_tcpv6 = {
|
|||||||
|
|
||||||
/* Default TCP parameters, got by opening a temporary TCP socket. */
|
/* Default TCP parameters, got by opening a temporary TCP socket. */
|
||||||
#ifdef TCP_MAXSEG
|
#ifdef TCP_MAXSEG
|
||||||
static int default_tcp_maxseg = -1;
|
static THREAD_LOCAL int default_tcp_maxseg = -1;
|
||||||
static int default_tcp6_maxseg = -1;
|
static THREAD_LOCAL int default_tcp6_maxseg = -1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Binds ipv4/ipv6 address <local> to socket <fd>, unless <flags> is set, in which
|
/* Binds ipv4/ipv6 address <local> to socket <fd>, unless <flags> is set, in which
|
||||||
@ -138,8 +138,8 @@ int tcp_bind_socket(int fd, int flags, struct sockaddr_storage *local, struct so
|
|||||||
struct sockaddr_storage bind_addr;
|
struct sockaddr_storage bind_addr;
|
||||||
int foreign_ok = 0;
|
int foreign_ok = 0;
|
||||||
int ret;
|
int ret;
|
||||||
static int ip_transp_working = 1;
|
static THREAD_LOCAL int ip_transp_working = 1;
|
||||||
static int ip6_transp_working = 1;
|
static THREAD_LOCAL int ip6_transp_working = 1;
|
||||||
|
|
||||||
switch (local->ss_family) {
|
switch (local->ss_family) {
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
@ -433,7 +433,7 @@ int tcp_connect_server(struct connection *conn, int data, int delack)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
#ifdef IP_BIND_ADDRESS_NO_PORT
|
#ifdef IP_BIND_ADDRESS_NO_PORT
|
||||||
static int bind_address_no_port = 1;
|
static THREAD_LOCAL int bind_address_no_port = 1;
|
||||||
setsockopt(fd, SOL_IP, IP_BIND_ADDRESS_NO_PORT, (const void *) &bind_address_no_port, sizeof(int));
|
setsockopt(fd, SOL_IP, IP_BIND_ADDRESS_NO_PORT, (const void *) &bind_address_no_port, sizeof(int));
|
||||||
#endif
|
#endif
|
||||||
ret = tcp_bind_socket(fd, flags, &src->source_addr, &conn->addr.from);
|
ret = tcp_bind_socket(fd, flags, &src->source_addr, &conn->addr.from);
|
||||||
|
|||||||
@ -69,7 +69,7 @@
|
|||||||
int raw_sock_to_pipe(struct connection *conn, struct pipe *pipe, unsigned int count)
|
int raw_sock_to_pipe(struct connection *conn, struct pipe *pipe, unsigned int count)
|
||||||
{
|
{
|
||||||
#ifndef ASSUME_SPLICE_WORKS
|
#ifndef ASSUME_SPLICE_WORKS
|
||||||
static int splice_detects_close;
|
static THREAD_LOCAL int splice_detects_close;
|
||||||
#endif
|
#endif
|
||||||
int ret;
|
int ret;
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
|
|||||||
@ -837,7 +837,7 @@ struct sockaddr_storage *str2ip2(const char *str, struct sockaddr_storage *sa, i
|
|||||||
*/
|
*/
|
||||||
struct sockaddr_storage *str2sa_range(const char *str, int *port, int *low, int *high, char **err, const char *pfx, char **fqdn, int resolve)
|
struct sockaddr_storage *str2sa_range(const char *str, int *port, int *low, int *high, char **err, const char *pfx, char **fqdn, int resolve)
|
||||||
{
|
{
|
||||||
static struct sockaddr_storage ss;
|
static THREAD_LOCAL struct sockaddr_storage ss;
|
||||||
struct sockaddr_storage *ret = NULL;
|
struct sockaddr_storage *ret = NULL;
|
||||||
char *back, *str2;
|
char *back, *str2;
|
||||||
char *port1, *port2;
|
char *port1, *port2;
|
||||||
@ -2493,7 +2493,7 @@ int buf2ip6(const char *buf, size_t len, struct in6_addr *dst)
|
|||||||
*/
|
*/
|
||||||
const char *quote_arg(const char *ptr)
|
const char *quote_arg(const char *ptr)
|
||||||
{
|
{
|
||||||
static char val[32];
|
static THREAD_LOCAL char val[32];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!ptr || !*ptr)
|
if (!ptr || !*ptr)
|
||||||
@ -2764,7 +2764,7 @@ static int my_tm_diff(const struct tm *a, const struct tm *b)
|
|||||||
const char *get_gmt_offset(time_t t, struct tm *tm)
|
const char *get_gmt_offset(time_t t, struct tm *tm)
|
||||||
{
|
{
|
||||||
/* Cache offsets from GMT (depending on whether DST is active or not) */
|
/* Cache offsets from GMT (depending on whether DST is active or not) */
|
||||||
static char gmt_offsets[2][5+1] = { "", "" };
|
static THREAD_LOCAL char gmt_offsets[2][5+1] = { "", "" };
|
||||||
|
|
||||||
char *gmt_offset;
|
char *gmt_offset;
|
||||||
struct tm tm_gmt;
|
struct tm tm_gmt;
|
||||||
|
|||||||
@ -218,9 +218,9 @@ const char *stat_field_names[ST_F_TOTAL_FIELDS] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* one line of info */
|
/* one line of info */
|
||||||
static struct field info[INF_TOTAL_FIELDS];
|
static THREAD_LOCAL struct field info[INF_TOTAL_FIELDS];
|
||||||
/* one line of stats */
|
/* one line of stats */
|
||||||
static struct field stats[ST_F_TOTAL_FIELDS];
|
static THREAD_LOCAL struct field stats[ST_F_TOTAL_FIELDS];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user