]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: threads: add new macros to declare self-initializing locks
authorWilly Tarreau <w@1wt.eu>
Sun, 25 Nov 2018 18:46:08 +0000 (19:46 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 26 Nov 2018 18:50:32 +0000 (19:50 +0100)
commit90fa97b65e155a04cd59bd12374e29357b9c8845
treea81fc954d8736fd450c9a840298aee67487317cd
parenta8ae77da616cf8f20da72f5c69b969f7b9777ee6
MINOR: threads: add new macros to declare self-initializing locks

Using __decl_spinlock(), __decl_rwlock(), __decl_aligned_spinlock()
and __decl_aligned_rwlock(), one can now simply declare a spinlock
or an rwlock which will automatically be initialized at boot time
by calling the ha_spin_init() or ha_rwlock_init() callback. The
"aligned" variants enforce a 64-byte alignment on the lock.
include/common/hathreads.h