mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
MINOR: task: move the nice field to the struct task only
The nice field isn't needed anymore for the tasklet so we can move it from the TASK_COMMON area into the struct task which already has a hole around the expire entry.
This commit is contained in:
parent
db4e238938
commit
e0d5942ddd
@ -115,7 +115,7 @@ struct task_per_thread {
|
|||||||
#define TASK_COMMON \
|
#define TASK_COMMON \
|
||||||
struct { \
|
struct { \
|
||||||
unsigned short state; /* task state : bitfield of TASK_ */ \
|
unsigned short state; /* task state : bitfield of TASK_ */ \
|
||||||
short nice; /* task prio from -1024 to +1024 */ \
|
/* 16-bit hole here */ \
|
||||||
unsigned int calls; /* number of times process was called */ \
|
unsigned int calls; /* number of times process was called */ \
|
||||||
struct task *(*process)(struct task *t, void *ctx, unsigned short state); /* the function which processes the task */ \
|
struct task *(*process)(struct task *t, void *ctx, unsigned short state); /* the function which processes the task */ \
|
||||||
void *context; /* the task's context */ \
|
void *context; /* the task's context */ \
|
||||||
@ -128,6 +128,8 @@ struct task {
|
|||||||
struct eb32sc_node rq; /* ebtree node used to hold the task in the run queue */
|
struct eb32sc_node rq; /* ebtree node used to hold the task in the run queue */
|
||||||
struct eb32_node wq; /* ebtree node used to hold the task in the wait queue */
|
struct eb32_node wq; /* ebtree node used to hold the task in the wait queue */
|
||||||
int expire; /* next expiration date for this task, in ticks */
|
int expire; /* next expiration date for this task, in ticks */
|
||||||
|
short nice; /* task prio from -1024 to +1024 */
|
||||||
|
/* 16-bit hole here */
|
||||||
unsigned long thread_mask; /* mask of thread IDs authorized to process the task */
|
unsigned long thread_mask; /* mask of thread IDs authorized to process the task */
|
||||||
uint64_t call_date; /* date of the last task wakeup or call */
|
uint64_t call_date; /* date of the last task wakeup or call */
|
||||||
uint64_t lat_time; /* total latency time experienced */
|
uint64_t lat_time; /* total latency time experienced */
|
||||||
|
@ -441,7 +441,6 @@ static inline struct task *task_init(struct task *t, unsigned long thread_mask)
|
|||||||
*/
|
*/
|
||||||
static inline void tasklet_init(struct tasklet *t)
|
static inline void tasklet_init(struct tasklet *t)
|
||||||
{
|
{
|
||||||
t->nice = 0;
|
|
||||||
t->calls = 0;
|
t->calls = 0;
|
||||||
t->state = TASK_F_TASKLET;
|
t->state = TASK_F_TASKLET;
|
||||||
t->process = NULL;
|
t->process = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user