haproxy/include/common
Willy Tarreau 9453ecd670 REORG: threads: extract atomic ops from hathreads.h
The hathreads.h file has quickly become a total mess because it contains
thread definitions, atomic operations and locking operations, all this for
multiple combinations of threads, debugging and architectures, and all this
done with random ordering!

This first patch extracts all the atomic ops code from hathreads.h to move
it to haproxy/atomic.h. The code there still contains several sections
based on non-thread vs thread, and GCC versions in the latter case. Each
section was arranged in the exact same order to ease finding.

The redundant HA_BARRIER() which was the same as __ha_compiler_barrier()
was dropped in favor of the latter which follows the naming convention
of all other barriers. It was only used in freq_ctr.c which was updated.
Additionally, __ha_compiler_barrier() was defined inconditionally but
used only for thread-related operations, so it was made thread-only like
HA_BARRIER() used to be. We'd still need to have two types of compiler
barriers, one for the general case (e.g. signals) and another one for
concurrency, but this was not addressed here.

Some comments were added at the beginning of each section to inform about
the use case and warn about the traps to avoid.

Some files which continue to include hathreads.h solely for atomic ops
should now be updated.
2020-06-11 10:18:56 +02:00
..
buffer.h REORG: include: move istbuf.h to haproxy/ 2020-06-11 10:18:56 +02:00
cfgparse.h REORG: include: split mini-clist into haproxy/list and list-t.h 2020-06-11 10:18:56 +02:00
chunk.h REORG: include: split buf.h into haproxy/buf-t.h and haproxy/buf.h 2020-06-11 10:18:56 +02:00
fcgi.h REORG: include: split buf.h into haproxy/buf-t.h and haproxy/buf.h 2020-06-11 10:18:56 +02:00
h1.h REORG: include: move ist.h from common/ to import/ 2020-06-11 10:18:56 +02:00
h2.h REORG: include: move ist.h from common/ to import/ 2020-06-11 10:18:56 +02:00
hathreads.h REORG: threads: extract atomic ops from hathreads.h 2020-06-11 10:18:56 +02:00
hpack-dec.h REORG: include: update all files to use haproxy/api.h or api-t.h if needed 2020-06-11 10:18:42 +02:00
hpack-enc.h REORG: include: split buf.h into haproxy/buf-t.h and haproxy/buf.h 2020-06-11 10:18:56 +02:00
hpack-huff.h BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00
hpack-tbl.h REORG: include: move ist.h from common/ to import/ 2020-06-11 10:18:56 +02:00
http-hdr.h REORG: include: move ist.h from common/ to import/ 2020-06-11 10:18:56 +02:00
http.h REORG: include: split buf.h into haproxy/buf-t.h and haproxy/buf.h 2020-06-11 10:18:56 +02:00
htx.h REORG: include: split buf.h into haproxy/buf-t.h and haproxy/buf.h 2020-06-11 10:18:56 +02:00
memory.h REORG: include: split mini-clist into haproxy/list and list-t.h 2020-06-11 10:18:56 +02:00
namespace.h REORG: ebtree: move the include files from ebtree to include/import/ 2020-06-11 09:31:11 +02:00
net_helper.h REORG: include: update all files to use haproxy/api.h or api-t.h if needed 2020-06-11 10:18:42 +02:00
regex.h REORG: include: update all files to use haproxy/api.h or api-t.h if needed 2020-06-11 10:18:42 +02:00
standard.h REORG: include: move SWAP/MID_RANGE/MAX_RANGE from tools.h to standard.h 2020-06-11 10:18:56 +02:00
ticks.h REORG: include: update all files to use haproxy/api.h or api-t.h if needed 2020-06-11 10:18:42 +02:00
time.h REORG: include: update all files to use haproxy/api.h or api-t.h if needed 2020-06-11 10:18:42 +02:00
uri_auth.h REORG: include: update all files to use haproxy/api.h or api-t.h if needed 2020-06-11 10:18:42 +02:00
xref.h CLEANUP: assorted typo fixes in the code and comments 2020-03-14 09:42:07 +01:00