]> git.ipfire.org Git - thirdparty/haproxy.git/commit
REORG: include: split hathreads into haproxy/thread.h and haproxy/thread-t.h
authorWilly Tarreau <w@1wt.eu>
Thu, 28 May 2020 13:29:19 +0000 (15:29 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2020 08:18:56 +0000 (10:18 +0200)
commit3f567e4949badb4d13e66f5688fc00fc10ab0a0a
tree39739a18a3907bd674e82e3a6142990b99dde9b1
parent5775d0964a0ac12b9305320d3a90d33c5dd4d7d6
REORG: include: split hathreads into haproxy/thread.h and haproxy/thread-t.h

This splits the hathreads.h file into types+macros and functions. Given
that most users of this file used to include it only to get the definition
of THREAD_LOCAL and MAXTHREADS, the bare minimum was placed into thread-t.h
(i.e. types and macros).

All the thread management was left to haproxy/thread.h. It's worth noting
the drop of the trailing "s" in the name, to remove the permanent confusion
that arises between this one and the system implementation (no "s") and the
makefile's option (no "s").

For consistency, src/hathreads.c was also renamed thread.c.

A number of files were updated to only include thread-t which is the one
they really needed.

Some future improvements are possible like replacing empty inlined
functions with macros for the thread-less case, as building at -O0 disables
inlining and causes these ones to be emitted. But this really is cosmetic.
47 files changed:
MAINTAINERS
Makefile
include/common/memory.h
include/common/regex.h
include/common/time.h
include/haproxy/list.h
include/haproxy/thread-t.h [new file with mode: 0644]
include/haproxy/thread.h [moved from include/common/hathreads.h with 73% similarity]
include/proto/log.h
include/proto/protocol.h
include/proto/signal.h
include/proto/task.h
include/types/backend.h
include/types/dict.h
include/types/dns.h
include/types/global.h
include/types/listener.h
include/types/log.h
include/types/proxy.h
include/types/server.h
include/types/spoe.h
include/types/ssl_sock.h
include/types/vars.h
src/51d.c
src/activity.c
src/auth.c
src/cfgparse.c
src/checks.c
src/compression.c
src/debug.c
src/ev_epoll.c
src/ev_evports.c
src/ev_kqueue.c
src/ev_poll.c
src/ev_select.c
src/flt_spoe.c
src/haproxy.c
src/hlua.c
src/memory.c
src/peers.c
src/pipe.c
src/queue.c
src/ring.c
src/stream.c
src/thread.c [moved from src/hathreads.c with 99% similarity]
src/time.c
src/wdt.c