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.
This commit is contained in:
Willy Tarreau 2022-11-22 10:24:07 +01:00
parent fc50b9dd14
commit 5ec79f1a04

View 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