struct mt_list shared_tasklet_list; /* Tasklet to be run, woken up by other threads */
struct list tasklets[TL_CLASSES]; /* tasklets (and/or tasks) to run, by class */
unsigned int rqueue_ticks; /* Insertion counter for the run queue */
- int task_list_size; /* Number of tasks among the tasklets */
+ int tasks_in_list; /* Number of tasks in the per-thread tasklets list */
int current_queue; /* points to current tasklet list being run, -1 if none */
unsigned int rq_total; /* total size of the run queue, prio_tree + tasklets */
struct task *current; /* current task (not tasklet) */
LIST_ISEMPTY(&task_per_thread[thr].tasklets[TL_NORMAL]) &&
LIST_ISEMPTY(&task_per_thread[thr].tasklets[TL_BULK]) &&
MT_LIST_ISEMPTY(&task_per_thread[thr].shared_tasklet_list)),
- task_per_thread[thr].task_list_size,
+ task_per_thread[thr].tasks_in_list,
task_per_thread[thr].rq_total,
stuck,
!!(task_profiling_mask & thr_bit));
MT_LIST_ADDQ(&task_per_thread[thr].shared_tasklet_list,
(struct mt_list *)&((struct tasklet *)t)->list);
_HA_ATOMIC_ADD(&task_per_thread[thr].rq_total, 1);
- _HA_ATOMIC_ADD(&task_per_thread[thr].task_list_size, 1);
+ _HA_ATOMIC_ADD(&task_per_thread[thr].tasks_in_list, 1);
if (sleeping_thread_mask & (1UL << thr)) {
_HA_ATOMIC_AND(&sleeping_thread_mask, ~(1UL << thr));
wake_thread(thr);
/* OK then this is a regular task */
- _HA_ATOMIC_SUB(&task_per_thread[tid].task_list_size, 1);
+ _HA_ATOMIC_SUB(&task_per_thread[tid].tasks_in_list, 1);
if (unlikely(t->call_date)) {
uint64_t now_ns = now_mono_time();
uint64_t lat = now_ns - t->call_date;
/* pick up to max[TL_NORMAL] regular tasks from prio-ordered run queues */
/* Note: the grq lock is always held when grq is not null */
picked = 0;
- budget = max[TL_NORMAL] - tt->task_list_size;
+ budget = max[TL_NORMAL] - tt->tasks_in_list;
while (picked < budget) {
if ((global_tasks_mask & tid_bit) && !grq) {
#ifdef USE_THREAD
if (picked) {
tt->tl_class_mask |= 1 << TL_NORMAL;
- _HA_ATOMIC_ADD(&tt->task_list_size, picked);
+ _HA_ATOMIC_ADD(&tt->tasks_in_list, picked);
_HA_ATOMIC_ADD(&tt->rq_total, picked);
activity[tid].tasksw += picked;
}