]> git.ipfire.org Git - thirdparty/haproxy.git/commit
REORG: sched: move idle time calculation from time.h to task.h
authorWilly Tarreau <w@1wt.eu>
Thu, 30 Sep 2021 15:53:22 +0000 (17:53 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 Oct 2021 16:37:51 +0000 (18:37 +0200)
commit6dfab112e112716f93f6beb946a28648c8dd6135
tree8e089cd5770e774cbaab952736e20b97f74c79aa
parent6136989a2272d9b4422de6486f9b9d492f2c8488
REORG: sched: move idle time calculation from time.h to task.h

time.h is a horrible place to put activity calculation, it's a
historical mistake because the functions were there. We already have
most of the parts in sched.{c,h} and these ones make an exception in
the middle, forcing time.h to include some thread stuff and to access
the before/after_poll and idle_pct values.

Let's move these 3 functions to task.h with the other ones. They were
prefixed with "sched_" instead of the historical "tv_" which already
made no sense anymore.
include/haproxy/task.h
include/haproxy/time.h
src/ev_epoll.c
src/ev_evports.c
src/ev_kqueue.c
src/ev_poll.c
src/ev_select.c