commit | 90fa97b65e155a04cd59bd12374e29357b9c8845 | [log] [tgz] |
---|---|---|
author | Willy Tarreau <w@1wt.eu> | Sun Nov 25 19:46:08 2018 +0100 |
committer | Willy Tarreau <w@1wt.eu> | Mon Nov 26 19:50:32 2018 +0100 |
tree | a81fc954d8736fd450c9a840298aee67487317cd | |
parent | a8ae77da616cf8f20da72f5c69b969f7b9777ee6 [diff] |
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.