Fix 1bit mutex test on platforms with 32 bit aligned pointers
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Sun, 13 Nov 2011 16:49:57 +0000 (17:49 +0100)
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>
Tue, 15 Nov 2011 08:27:00 +0000 (09:27 +0100)
commit469e1a15a0eea2cf355fba245343a3ac1c29662b
tree7422ed1d41607bfbe455fe44e0ff69a6af45f4fa
parent65eb65b7779e5e6ec72de9bb372568d88b1ec7bb
Fix 1bit mutex test on platforms with 32 bit aligned pointers

The 1 bit mutex tests asserts: ((gsize) ptrs) % 8, ==, 0), which fails
when the platform only aligns porters to 32 bits (e.g. S390 and
powerpc).

I'm not sure why this assertion was placed here, but given
that internally g_pointer_bit_trylock uses g_atomic_int_or internally
change the assertion so it only requires the alignment to be a multiple
of sizeof(int)
glib/tests/1bit-mutex.c