Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 6 Feb 2014 10:08:57 +1100
From: Matthew Fernandez <>
To: Rich Felker <>, <>
Subject: Re: 64-bit atomic ops on 32-bit ARM

Ah, so it's used for operating on 64-bit bitfields. Presumably the meaning of each bit is orthogonal
to the others so the atomicity of the write as a whole is irrelevant. Thanks for the clarification,

On 06/02/14 10:06, Rich Felker wrote:
> On Thu, Feb 06, 2014 at 09:56:47AM +1100, Matthew Fernandez wrote:
>> Hi all,
>> The header atomic.h contains a couple of functions for operations on 64-bit types. Despite their
>> name, these do not appear to be atomic to me. For example:
>>   static inline void a_and_64(volatile uint64_t *p, uint64_t v)
> The function name is simply a misnomer. It should be called "atomic
> bitclear" (and, for "or", "atomic bitset). That's the only way it's
> actually used. In other words we don't care that the and/or operation
> on both words happen atomically with respect to one another, only that
> each bit individually behaves atomically with respect to being set and
> cleared.
> BTW, changing the name and semantics would also allow us to drop from
> performing two atomic operations to just performing on atomic
> operation (on the word that actually needs to change). This would be a
> fairly significant optimization, I think. But for now it's not a bug,
> just a missed optimization.
> Rich


The information in this e-mail may be confidential and subject to legal professional privilege and/or copyright. National ICT Australia Limited accepts no liability for any damage caused by this email or its attachments.

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.