]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: applets: no need to check for runqueue's emptiness in appctx_res_wakeup()
authorWilly Tarreau <w@1wt.eu>
Sun, 5 Nov 2017 11:01:11 +0000 (12:01 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 5 Nov 2017 11:01:11 +0000 (12:01 +0100)
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

index a6f2633b1b857d1225a3da98743e5fd63ac36a50..51a7e26f0a780625fafaa8a93f6a3c8fbb7a0305 100644 (file)
@@ -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;