From: Willy Tarreau Date: Tue, 22 Nov 2022 09:24:07 +0000 (+0100) Subject: BUILD: sched: fix build with DEBUG_THREAD with the previous commit X-Git-Tag: v2.7-dev10~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ec79f1a042982f90f790e97773af6849e8d5ddc;p=thirdparty%2Fhaproxy.git BUILD: sched: fix build with DEBUG_THREAD with the previous commit The build with DEBUG_THREAD was broken by commit fc50b9dd1 ("BUG/MAJOR: sched: protect task during removal from wait queue"). It took me a while to figure how to declare and aligned and initialized rwlock that wasn't static, but it turns out that __decl_aligned_rwlock() does exactly this, so that we don't have to assign an integer value when a struct is expected in case of debugging. No backport is needed. --- diff --git a/src/task.c b/src/task.c index 5d009faf33..faf21f3f1d 100644 --- a/src/task.c +++ b/src/task.c @@ -40,7 +40,7 @@ DECLARE_POOL(pool_head_notification, "notification", sizeof(struct notification) * into another one. Storing the WQ index into the task doesn't seem to be * sufficient either. */ -__decl_thread(HA_RWLOCK_T wq_lock THREAD_ALIGNED(64) = 0); +__decl_aligned_rwlock(wq_lock); /* Flags the task for immediate destruction and puts it into its first * thread's shared tasklet list if not yet queued/running. This will bypass