TASK_WOKEN_RES)
#define TASK_F_TASKLET 0x00008000 /* nature of this task: 0=task 1=tasklet */
-/* unused: 0x10000..0x80000000 */
+#define TASK_F_USR1 0x00010000 /* preserved user flag 1, application-specific, def:0 */
+/* unused: 0x20000..0x80000000 */
enum {
budgets[queue]--;
t = (struct task *)LIST_ELEM(tl_queues[queue].n, struct tasklet *, list);
- state = t->state & (TASK_SHARED_WQ|TASK_SELF_WAKING|TASK_HEAVY|TASK_F_TASKLET|TASK_KILLED);
+ state = t->state & (TASK_SHARED_WQ|TASK_SELF_WAKING|TASK_HEAVY|TASK_F_TASKLET|TASK_KILLED|TASK_F_USR1);
ti->flags &= ~TI_FL_STUCK; // this thread is still running
activity[tid].ctxsw++;
LIST_DEL_INIT(&((struct tasklet *)t)->list);
__ha_barrier_store();
- state = _HA_ATOMIC_XCHG(&t->state, state | TASK_RUNNING);
+ state = _HA_ATOMIC_XCHG(&t->state, state|TASK_RUNNING|TASK_F_USR1);
__ha_barrier_atomic_store();
/* OK then this is a regular task */