REORG: thread/clock: move the clock parts of thread_info to thread_ctx
authorWilly Tarreau <w@1wt.eu>
Thu, 30 Sep 2021 16:28:49 +0000 (18:28 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 8 Oct 2021 15:22:26 +0000 (17:22 +0200)
commit45c38e22bfd073fec58a743be16adb8b3ec1b10f
tree3a0eeda7acf6c04714b15b13f1ad201c2e581c30
parent1a9c922b532c8de4dbc7139a649538ce79096c90
REORG: thread/clock: move the clock parts of thread_info to thread_ctx

The "thread_info" name was initially chosen to store all info about
threads but since we now have a separate per-thread context, there is
no point keeping some of its elements in the thread_info struct.

As such, this patch moves prev_cpu_time, prev_mono_time and idle_pct to
thread_ctx, into the thread context, with the scheduler parts. Instead
of accessing them via "ti->" we now access them via "th_ctx->", which
makes more sense as they're totally dynamic, and will be required for
future evolutions. There's no room problem for now, the structure still
has 84 bytes available at the end.
include/haproxy/tinfo-t.h
src/clock.c
src/compression.c
src/debug.c
src/flt_http_comp.c
src/wdt.c