MINOR: threads: change lock_t to an unsigned int
We don't need to waste the size of a long for the locks: with the plocks,
even an unsigned short would offer enough room for up to 126 threads! Let's
use an unsigned int which will be easier to place in certain structures
and will more conveniently plug some holes, and Atomic ops are at least
as fast on 32-bit as on 64-bit. This will not change anything for 32-bit
platforms.
diff --git a/include/haproxy/thread-t.h b/include/haproxy/thread-t.h
index e827361..bac83ae 100644
--- a/include/haproxy/thread-t.h
+++ b/include/haproxy/thread-t.h
@@ -95,8 +95,8 @@
/*** Common parts below ***/
/* storage types used by spinlocks and RW locks */
-#define __HA_SPINLOCK_T unsigned long
-#define __HA_RWLOCK_T unsigned long
+#define __HA_SPINLOCK_T unsigned int
+#define __HA_RWLOCK_T unsigned int
/* When thread debugging is enabled, we remap HA_SPINLOCK_T and HA_RWLOCK_T to