Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Sun, 19 Apr 2015 14:46:05 +0200
From: Szabolcs Nagy <>
Subject: Re: [PATCH] Use CAS instead of atomic swap to implement

* 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)

View attachment "abi.x86_64.diff" of type "text/x-diff" (4080 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.