lua_setmetatable(L, -2);
/* Create the applet context */
- appctx = appctx_new(&update_applet, MAX_THREADS_MASK);
+ appctx = appctx_new(&update_applet, 1UL << tid);
if (!appctx) {
hlua_pusherror(L, "socket: out of memory");
goto out_fail_conf;
ctx->ctx.hlua_apptcp.flags = 0;
/* Create task used by signal to wakeup applets. */
- task = task_new(MAX_THREADS_MASK);
+ task = task_new(1UL << tid);
if (!task) {
SEND_ERR(px, "Lua applet tcp '%s': out of memory.\n",
ctx->rule->arg.hlua_rule->fcn.name);
ctx->ctx.hlua_apphttp.flags |= APPLET_HTTP11;
/* Create task used by signal to wakeup applets. */
- task = task_new(MAX_THREADS_MASK);
+ task = task_new(1UL << tid);
if (!task) {
SEND_ERR(px, "Lua applet http '%s': out of memory.\n",
ctx->rule->arg.hlua_rule->fcn.name);
* 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(MAX_THREADS_MASK);
+ appctx->ctx.hlua_cli.task = task_new(1UL << tid);
if (!appctx->ctx.hlua_cli.task) {
SEND_ERR(NULL, "Lua cli '%s': out of memory.\n", fcn->name);
goto error;