From 62a124977bd900abb6cd7e07f0cccbd982d3225c Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 5 Nov 2017 12:01:11 +0100 Subject: [PATCH] MINOR: applets: no need to check for runqueue's emptiness in appctx_res_wakeup() The __appctx_wakeup() function already does it. It matters with threads enabled because it simplifies the code in appctx_res_wakeup() to get rid of this test. --- include/proto/applet.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/include/proto/applet.h b/include/proto/applet.h index a6f2633b1..51a7e26f0 100644 --- a/include/proto/applet.h +++ b/include/proto/applet.h @@ -147,11 +147,6 @@ static inline int appctx_res_wakeup(struct appctx *appctx) SPIN_UNLOCK(APPLETS_LOCK, &applet_active_lock); return 1; } - - if (!LIST_ISEMPTY(&appctx->runq)) { - SPIN_UNLOCK(APPLETS_LOCK, &applet_active_lock); - return 0; - } __appctx_wakeup(appctx); SPIN_UNLOCK(APPLETS_LOCK, &applet_active_lock); return 1;