All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] arm & 64bit atomics
@ 2014-07-03 14:56 Michael Haberler
  2014-07-03 18:41 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Haberler @ 2014-07-03 14:56 UTC (permalink / raw)
  To: xenomai

we found this: http://stackoverflow.com/questions/9857760/can-an-arm-interrupt-occur-in-mid-instruction and are considering which impact that has on machinekit, which uses doubles in memory shared between threads, relying on updates being atomic

I wonder if this topic has come up in the Xenomai context?

specifically - can it happen that an RT thread is rescheduled in the middle of a 64bit store?

also, I found that for older ARM's there are kernel mode helpers to support 64bit atomics (https://www.kernel.org/doc/Documentation/arm/kernel_user_helpers.txt) - I assume those work fine with Xenomai?

sorry about the fuzzy question - still trying to figure if/how this affects us

- Michael

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

* Re: [Xenomai] arm & 64bit atomics
  2014-07-03 14:56 [Xenomai] arm & 64bit atomics Michael Haberler
@ 2014-07-03 18:41 ` Gilles Chanteperdrix
  0 siblings, 0 replies; 2+ messages in thread
From: Gilles Chanteperdrix @ 2014-07-03 18:41 UTC (permalink / raw)
  To: Michael Haberler, xenomai

On 07/03/2014 04:56 PM, Michael Haberler wrote:
> we found this: http://stackoverflow.com/questions/9857760/can-an-arm-interrupt-occur-in-mid-instruction and are considering which impact that has on machinekit, which uses doubles in memory shared between threads, relying on updates being atomic
> 
> I wonder if this topic has come up in the Xenomai context?
> 
> specifically - can it happen that an RT thread is rescheduled in the middle of a 64bit store?

Obviously, yes.

> 
> also, I found that for older ARM's there are kernel mode helpers to support 64bit atomics (https://www.kernel.org/doc/Documentation/arm/kernel_user_helpers.txt) - I assume those work fine with Xenomai?

Yes, the kuser helpers work, but they are more made for implementers of
a user-space run-time environment than for applications. Applications
should use the __sync_* primitives gcc proposes, and which will do the
right thing.

-- 
                                                                Gilles.


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

end of thread, other threads:[~2014-07-03 18:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-03 14:56 [Xenomai] arm & 64bit atomics Michael Haberler
2014-07-03 18:41 ` Gilles Chanteperdrix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.