MINOR: applet: Uninline appctx_free()
This functin is uninlined and move in src/applet.c. It is mandatory to add
traces for applets.
diff --git a/include/haproxy/applet.h b/include/haproxy/applet.h
index e610ba4..b805440 100644
--- a/include/haproxy/applet.h
+++ b/include/haproxy/applet.h
@@ -46,6 +46,7 @@
struct appctx *appctx_new_on(struct applet *applet, struct sedesc *sedesc, int thr);
int appctx_finalize_startup(struct appctx *appctx, struct proxy *px, struct buffer *input);
void appctx_free_on_early_error(struct appctx *appctx);
+void appctx_free(struct appctx *appctx);
static inline struct appctx *appctx_new_here(struct applet *applet, struct sedesc *sedesc)
{
@@ -88,22 +89,6 @@
_HA_ATOMIC_DEC(&nb_applets);
}
-static inline void appctx_free(struct appctx *appctx)
-{
- /* The task is supposed to be run on this thread, so we can just
- * check if it's running already (or about to run) or not
- */
- if (!(appctx->t->state & (TASK_QUEUED | TASK_RUNNING)))
- __appctx_free(appctx);
- else {
- /* if it's running, or about to run, defer the freeing
- * until the callback is called.
- */
- appctx->state |= APPLET_WANT_DIE;
- task_wakeup(appctx->t, TASK_WOKEN_OTHER);
- }
-}
-
/* wakes up an applet when conditions have changed. We're using a macro here in
* order to retrieve the caller's place.
*/
diff --git a/src/applet.c b/src/applet.c
index 63ee155..a79bc63 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -125,6 +125,23 @@
appctx_free(appctx);
}
+void appctx_free(struct appctx *appctx)
+{
+ /* The task is supposed to be run on this thread, so we can just
+ * check if it's running already (or about to run) or not
+ */
+ if (!(appctx->t->state & (TASK_QUEUED | TASK_RUNNING))) {
+ __appctx_free(appctx);
+ }
+ else {
+ /* if it's running, or about to run, defer the freeing
+ * until the callback is called.
+ */
+ appctx->state |= APPLET_WANT_DIE;
+ task_wakeup(appctx->t, TASK_WOKEN_OTHER);
+ }
+}
+
/* reserves a command context of at least <size> bytes in the <appctx>, for
* use by a CLI command or any regular applet. The pointer to this context is
* stored in ctx.svcctx and is returned. The caller doesn't need to release