From: Christopher Faulet Date: Tue, 29 Aug 2017 07:51:52 +0000 (+0200) Subject: MINOR: threads: Add THREAD_LOCAL macro X-Git-Tag: v1.8-rc1~169 X-Git-Url: http://git.haproxy.org/?a=commitdiff_plain;h=e9bd686b68279406b954239ce38f5bf1b24462be;p=haproxy-3.0.git MINOR: threads: Add THREAD_LOCAL macro When compiled with threads support, this marco is set to __thread. Else it is empty. --- diff --git a/include/common/config.h b/include/common/config.h index f5d290f..f06ba3b 100644 --- a/include/common/config.h +++ b/include/common/config.h @@ -41,6 +41,12 @@ # define CONFIG_HAP_MEM_OPTIM #endif /* CONFIG_HAP_NO_MEM_OPTIM */ +#ifdef USE_THREAD +#define THREAD_LOCAL __thread +#else +#define THREAD_LOCAL +#endif + /* CONFIG_HAP_INLINE_FD_SET * This makes use of inline FD_* macros instead of calling equivalent * functions. Benchmarks on a Pentium-M show that using functions is