haproxy/include/common
Willy Tarreau 0c026f49e7 MINOR: threads: add more consistency between certain variables in no-thread case
When threads are disabled, some variables such as tid and tid_bit are
still checked everywhere, the MAX_THREADS_MASK macro is ~0UL while
MAX_THREADS is 1, and the all_threads_mask variable is replaced with a
macro forced to zero. The compiler cannot optimize away all this code
involving checks on tid and tid_bit, and we end up in special cases
where all_threads_mask has to be specifically tested for being zero or
not. It is not even certain the code paths are always equivalent when
testing without threads and with nbthread 1.

Let's change this to make sure we always present a single thread when
threads are disabled, and have the relevant values declared as constants
so that the compiler can optimize all the tests away. Now we have
MAX_THREADS_MASK set to 1, all_threads_mask set to 1, tid set to zero
and tid_bit set to 1. Doing just this has removed 4 kB of code in the
no-thread case.

A few checks for all_threads_mask==0 have been removed since it never
happens anymore.
2018-08-02 17:48:09 +02:00
..
accept4.h
base64.h
buf.h MEDIUM: buffers: make b_xfer() automatically swap buffers when possible 2018-07-20 19:21:43 +02:00
buffer.h MAJOR: buffer: finalize buffer detachment 2018-07-19 16:23:43 +02:00
cfgparse.h MINOR: Some spelling cleanup in the comments. 2018-06-21 20:43:52 +02:00
chunk.h MAJOR: chunks: replace struct chunk with struct buffer 2018-07-19 16:23:43 +02:00
compat.h BUILD: tcp: define SOL_TCP when only IPPROTO_TCP exists 2016-08-10 21:11:38 +02:00
compiler.h BUILD/MINOR: compiler: fix offsetof() on older compilers 2018-07-30 11:49:35 +02:00
config.h BUG/MINOR: pools/threads: don't ignore DEBUG_UAF on double-word CAS capable archs 2018-02-22 14:18:45 +01:00
debug.h MINOR: debug: enable memory poisonning to use byte 0 2015-10-08 14:12:13 +02:00
defaults.h MINOR: tasks: Make the number of tasks to run at once configurable. 2018-05-26 20:03:24 +02:00
epoll.h
errors.h
h2.h MINOR: h2: detect presence of CONNECT and/or content-length 2018-04-26 10:15:14 +02:00
hash.h MINOR: hash: add new function hash_crc32c 2018-03-21 05:04:01 +01:00
hathreads.h MINOR: threads: add more consistency between certain variables in no-thread case 2018-08-02 17:48:09 +02:00
hpack-dec.h MAJOR: chunks: replace struct chunk with struct buffer 2018-07-19 16:23:43 +02:00
hpack-enc.h MAJOR: chunks: replace struct chunk with struct buffer 2018-07-19 16:23:43 +02:00
hpack-huff.h MINOR: hpack: implement the HPACK Huffman table decoder 2017-10-31 18:03:24 +01:00
hpack-tbl.h BUG/MAJOR: hpack: don't pretend large headers fit in empty table 2017-12-04 18:06:51 +01:00
http-hdr.h MINOR: http: add very simple header management based on double strings 2017-10-22 09:54:14 +02:00
ist.h MINOR: ist: Add the function isteqi 2018-07-20 13:39:30 +02:00
istbuf.h MINOR: buffer: rename the data length member to '->data' 2018-07-19 16:23:43 +02:00
memory.h MINOR: debug/pools: make DEBUG_UAF also detect underflows 2018-02-22 14:18:45 +01:00
mini-clist.h MEDIUM: lists: list_for_each_entry{_safe}_from functions 2017-10-31 03:44:11 +01:00
namespace.h
net_helper.h MINOR: net_helper: add 64-bit read/write functions 2017-09-21 06:27:08 +02:00
regex.h MINOR: threads/regex: Change Regex trash buffer into a thread local variable 2017-10-31 13:58:31 +01:00
splice.h
standard.h MAJOR: chunks: replace struct chunk with struct buffer 2018-07-19 16:23:43 +02:00
syscall.h BUILD: enable build on Linux/s390x 2015-10-12 20:58:51 +02:00
template.h
ticks.h
time.h MEDIUM: threads/time: Many global variables from time.h are now thread-local 2017-10-31 13:58:30 +01:00
tools.h
uri_auth.h MINOR: stats: add ST_SHOWADMIN to pass the admin info in the regular flags 2016-03-11 17:08:05 +01:00
version.h [RELEASE] Released version 1.9-dev0 2017-11-26 19:50:17 +01:00
xref.h MEDIUM: threads/xref: Convert xref function to a thread safe model 2017-10-31 13:58:32 +01:00