From: William Lallemand Date: Fri, 30 Oct 2026 10:54:43 +0000 (+0100) Subject: MINOR: thread: add EXTRAS_LOCK so addons can name their locks X-Git-Tag: v3.5-dev11~89 X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=a9e333140c7bc2f9b73924a7c28d16513921bbcd;p=haproxy.git MINOR: thread: add EXTRAS_LOCK so addons can name their locks Provide an unconditional EXTRAS_LOCK label so addons can name their locks using the existing lock debugging and statistics infrastructure. This avoids adding addon-specific lock labels or build-option guards to the core enum. Report the label as EXTRAS in lock statistics. --- diff --git a/include/haproxy/thread-t.h b/include/haproxy/thread-t.h index cf4ebec6d..8c363b20c 100644 --- a/include/haproxy/thread-t.h +++ b/include/haproxy/thread-t.h @@ -226,6 +226,7 @@ enum lock_label { DEBUG3_LOCK, DEBUG4_LOCK, DEBUG5_LOCK, + EXTRAS_LOCK, LOCK_LABELS }; diff --git a/src/thread.c b/src/thread.c index 56b1dc2cb..4ca60a591 100644 --- a/src/thread.c +++ b/src/thread.c @@ -513,6 +513,7 @@ const char *lock_label(enum lock_label label) case DEBUG3_LOCK: return "DEBUG3"; case DEBUG4_LOCK: return "DEBUG4"; case DEBUG5_LOCK: return "DEBUG5"; + case EXTRAS_LOCK: return "EXTRAS"; case LOCK_LABELS: break; /* keep compiler happy */ }; /* only way to come here is consecutive to an internal bug */