mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-17 12:35:37 +00:00
MINOR: task: make sched->current also reflect tasklets
sched->current is used to know the current task/tasklet, and is currently only used by the panic dump code. However it turns out it was not set for tasklets, which prevents us from using it for more usages, despite the panic handling code already handling this case very well. Let's make sure it's now set.
This commit is contained in:
parent
bb238834da
commit
d23d413e38
@ -339,10 +339,13 @@ static int run_tasks_from_list(struct list *list, int max)
|
||||
ctx = t->context;
|
||||
process = t->process;
|
||||
t->calls++;
|
||||
sched->current = t;
|
||||
|
||||
if (TASK_IS_TASKLET(t)) {
|
||||
process(NULL, ctx, state);
|
||||
done++;
|
||||
sched->current = NULL;
|
||||
__ha_barrier_store();
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -356,7 +359,6 @@ static int run_tasks_from_list(struct list *list, int max)
|
||||
t->call_date = now_ns;
|
||||
}
|
||||
|
||||
sched->current = t;
|
||||
__ha_barrier_store();
|
||||
if (likely(process == process_stream))
|
||||
t = process_stream(t, ctx, state);
|
||||
|
Loading…
Reference in New Issue
Block a user