diff --git a/include/haproxy/task.h b/include/haproxy/task.h index c5c0c1eb6..df4b42ea5 100644 --- a/include/haproxy/task.h +++ b/include/haproxy/task.h @@ -262,6 +262,13 @@ static inline int __task_set_state_and_tid(struct task *t, int expected_tid, int #endif } +static inline int __task_get_new_tid_field(int curtid) +{ + if (curtid >= 0 || curtid < -1) + return curtid; + return -2 - tid; +} + /* puts the task in run queue with reason flags , and returns */ /* This will put the task in the local runqueue if the task is only runnable * by the current thread, in the global runqueue otherwies. With DEBUG_TASK,