From: Willy Tarreau Date: Sun, 5 Nov 2017 11:01:11 +0000 (+0100) Subject: MINOR: applets: no need to check for runqueue's emptiness in appctx_res_wakeup() X-Git-Tag: v1.8-rc3~57 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=62a124977bd900abb6cd7e07f0cccbd982d3225c;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/include/proto/applet.h b/include/proto/applet.h index a6f2633b1b..51a7e26f0a 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;