CLEANUP: threads: replace the last few 1UL<<tid with tid_bit
There were a few occurences left, better replace them now.
diff --git a/src/applet.c b/src/applet.c
index b0783e6..427062e 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -43,7 +43,7 @@
curr = LIST_NEXT(&applet_active_queue, typeof(curr), runq);
while (&curr->runq != &applet_active_queue) {
next = LIST_NEXT(&curr->runq, typeof(next), runq);
- if (curr->process_mask & (1UL << tid)) {
+ if (curr->process_mask & tid_bit) {
LIST_DEL(&curr->runq);
curr->state = APPLET_RUNNING;
LIST_ADDQ(&applet_cur_queue, &curr->runq);
diff --git a/src/flt_spoe.c b/src/flt_spoe.c
index 938faab..cdb6238 100644
--- a/src/flt_spoe.c
+++ b/src/flt_spoe.c
@@ -1949,7 +1949,7 @@
memset(appctx->ctx.spoe.ptr, 0, pool2_spoe_appctx->size);
appctx->st0 = SPOE_APPCTX_ST_CONNECT;
- if ((SPOE_APPCTX(appctx)->task = task_new(1UL << tid)) == NULL)
+ if ((SPOE_APPCTX(appctx)->task = task_new(tid_bit)) == NULL)
goto out_free_spoe_appctx;
SPOE_APPCTX(appctx)->owner = appctx;
diff --git a/src/hlua.c b/src/hlua.c
index 6edb08a..4911204 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -2510,7 +2510,7 @@
lua_setmetatable(L, -2);
/* Create the applet context */
- appctx = appctx_new(&update_applet, 1UL << tid);
+ appctx = appctx_new(&update_applet, tid_bit);
if (!appctx) {
hlua_pusherror(L, "socket: out of memory");
goto out_fail_conf;
@@ -6165,7 +6165,7 @@
ctx->ctx.hlua_apptcp.flags = 0;
/* Create task used by signal to wakeup applets. */
- task = task_new(1UL << tid);
+ task = task_new(tid_bit);
if (!task) {
SEND_ERR(px, "Lua applet tcp '%s': out of memory.\n",
ctx->rule->arg.hlua_rule->fcn.name);
@@ -6366,7 +6366,7 @@
ctx->ctx.hlua_apphttp.flags |= APPLET_HTTP11;
/* Create task used by signal to wakeup applets. */
- task = task_new(1UL << tid);
+ task = task_new(tid_bit);
if (!task) {
SEND_ERR(px, "Lua applet http '%s': out of memory.\n",
ctx->rule->arg.hlua_rule->fcn.name);
@@ -6911,7 +6911,7 @@
* We use the same wakeup fonction than the Lua applet_tcp and
* applet_http. It is absolutely compatible.
*/
- appctx->ctx.hlua_cli.task = task_new(1UL << tid);
+ appctx->ctx.hlua_cli.task = task_new(tid_bit);
if (!appctx->ctx.hlua_cli.task) {
SEND_ERR(NULL, "Lua cli '%s': out of memory.\n", fcn->name);
goto error;
diff --git a/src/task.c b/src/task.c
index 0022bff..7623da9 100644
--- a/src/task.c
+++ b/src/task.c
@@ -229,7 +229,7 @@
while (local_tasks_count < 16) {
t = eb32_entry(rq_next, struct task, rq);
rq_next = eb32_next(rq_next);
- if (t->process_mask & (1UL << tid)) {
+ if (t->process_mask & tid_bit) {
/* detach the task from the queue */
__task_unlink_rq(t);
t->state |= TASK_RUNNING;