mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 20:46:11 +02:00
CLEANUP: threads: replace the last few 1UL<<tid with tid_bit
There were a few occurences left, better replace them now.
This commit is contained in:
parent
79a481ddde
commit
5f4a47b701
@ -43,7 +43,7 @@ void applet_run_active()
|
||||
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);
|
||||
|
||||
@ -1949,7 +1949,7 @@ spoe_create_appctx(struct spoe_config *conf)
|
||||
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;
|
||||
|
||||
@ -2510,7 +2510,7 @@ __LJMP static int hlua_socket_new(lua_State *L)
|
||||
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 @@ static int hlua_applet_tcp_init(struct appctx *ctx, struct proxy *px, struct str
|
||||
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 @@ static int hlua_applet_http_init(struct appctx *ctx, struct proxy *px, struct st
|
||||
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 @@ static int hlua_cli_parse_fct(char **args, struct appctx *appctx, void *private)
|
||||
* 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;
|
||||
|
||||
@ -229,7 +229,7 @@ void process_runnable_tasks()
|
||||
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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user