]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: sched: fix build with DEBUG_THREAD with the previous commit
authorWilly Tarreau <w@1wt.eu>
Tue, 22 Nov 2022 09:24:07 +0000 (10:24 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 22 Nov 2022 09:24:07 +0000 (10:24 +0100)
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.

src/task.c

index 5d009faf33cc9f27f89913ff2e74ed78b3a76b74..faf21f3f1d3c88bbe63ddd306984b119ec68bd6d 100644 (file)
@@ -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 <t> for immediate destruction and puts it into its first
  * thread's shared tasklet list if not yet queued/running. This will bypass