Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <52F2C1AF.8020903@nicta.com.au>
Date: Thu, 6 Feb 2014 09:56:47 +1100
From: Matthew Fernandez <matthew.fernandez@...ta.com.au>
To: <musl@...ts.openwall.com>
Subject: 64-bit atomic ops on 32-bit ARM

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)
  {
    union { uint64_t v; uint32_t r[2]; } u = { v };
    a_and((int *)p, u.r[0]);
    a_and((int *)p+1, u.r[1]);
  }

Have I misunderstood something or is there some other reason behind their implementation? AIUI on
certain ARM platforms there is actually no way to implement atomic 64-bit ops without kernel support.

If replying, please CC me directly as I'm not on the list.

Thanks,
Matt

________________________________

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.