* Rich Felker [2015-04-19 02:01:32 -0400]: > On Sun, Apr 19, 2015 at 08:50:18AM +0300, Alexander Monakov wrote: > > On Sat, 18 Apr 2015, Rich Felker wrote: > > > > > > while (*(volatile int *)s || a_cas(s, 0, 1)) a_spin(); > > > > I think so, Yes. Is the cast required, or is it possible to change the > > pthread_spinlock_t typedef to 'volatile int'? > > For C++ ABI purposes, I think switching to volatile int would be a > different type. :( > > I wouldn't really be opposed to changing it for C and just having the > ABI-compat type used when __cplusplus is defined. We already do that > for pthread_t. > btw pthread_spinlock_t is volatile int in glibc, i didnt catch this abi diff earlier because it only matters when used as a pointer now changed my abi checks for all type T to do void x_T(T x, T* ptr, size(*y)[sizeof(T)], align(*z)[__alignof__(T)]){} but i found no other case with qualifier differences (updated x86_64 abi diffs are attached)