MINOR: task: introduce a thread-local "sched" variable for local scheduler stuff
The aim is to rassemble all scheduler information related to the current
thread. It simply points to task_per_thread[tid] without having to perform
the operation at each time. We save around 1.2 kB of code on performance
sensitive paths and increase the request rate by almost 1%.
diff --git a/src/debug.c b/src/debug.c
index a2b99c9..1a1301c 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -77,7 +77,7 @@
return;
chunk_appendf(buf, " curr_task=");
- ha_task_dump(buf, curr_task, " ");
+ ha_task_dump(buf, sched->current, " ");
}