MINOR: task: Rename run_queue and run_queue_cur counters
<run_queue> is used to track the number of task in the run queue and
<run_queue_cur> is a copy used for the reporting purpose. These counters has
been renamed, respectively, <tasks_run_queue> and <tasks_run_queue_cur>. So the
naming is consistent between tasks and applets.
[wt: needed for next fixes, backport to 1.7 and 1.6]
diff --git a/include/proto/stream.h b/include/proto/stream.h
index db23956..b439344 100644
--- a/include/proto/stream.h
+++ b/include/proto/stream.h
@@ -302,7 +302,7 @@
*/
avail = pool2_buffer->allocated - pool2_buffer->used - global.tune.reserved_bufs / 2;
- if (avail > (int)run_queue)
+ if (avail > (int)tasks_run_queue)
__stream_offer_buffers(avail);
}
diff --git a/include/proto/task.h b/include/proto/task.h
index 107c961..70fd0b3 100644
--- a/include/proto/task.h
+++ b/include/proto/task.h
@@ -80,8 +80,8 @@
/* a few exported variables */
extern unsigned int nb_tasks; /* total number of tasks */
-extern unsigned int run_queue; /* run queue size */
-extern unsigned int run_queue_cur;
+extern unsigned int tasks_run_queue; /* run queue size */
+extern unsigned int tasks_run_queue_cur;
extern unsigned int nb_tasks_cur;
extern unsigned int niced_tasks; /* number of niced tasks in the run queue */
extern struct pool_head *pool2_task;
@@ -132,16 +132,16 @@
}
/*
- * Unlink the task from the run queue. The run_queue size and number of niced
- * tasks are updated too. A pointer to the task itself is returned. The task
- * *must* already be in the run queue before calling this function. If unsure,
- * use the safer task_unlink_rq() function. Note that the pointer to the next
- * run queue entry is neither checked nor updated.
+ * Unlink the task from the run queue. The tasks_run_queue size and number of
+ * niced tasks are updated too. A pointer to the task itself is returned. The
+ * task *must* already be in the run queue before calling this function. If
+ * unsure, use the safer task_unlink_rq() function. Note that the pointer to the
+ * next run queue entry is neither checked nor updated.
*/
static inline struct task *__task_unlink_rq(struct task *t)
{
eb32_delete(&t->rq);
- run_queue--;
+ tasks_run_queue--;
if (likely(t->nice))
niced_tasks--;
return t;