mailing list of musl libc
 help / color / mirror / code / Atom feed
* 64-bit atomic ops on 32-bit ARM
@ 2014-02-05 22:56 Matthew Fernandez
  2014-02-05 23:06 ` Rich Felker
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Fernandez @ 2014-02-05 22:56 UTC (permalink / raw)
  To: musl

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-05 23:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-05 22:56 64-bit atomic ops on 32-bit ARM Matthew Fernandez
2014-02-05 23:06 ` Rich Felker
2014-02-05 23:08   ` Matthew Fernandez

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).