All of lore.kernel.org
 help / color / mirror / Atom feed
* Could std::atomic<T> be shared bettween rt thread and nrt thread?
@ 2020-05-09  8:28 孙世龙
  2020-05-11  6:40 ` Jan Kiszka
  0 siblings, 1 reply; 2+ messages in thread
From: 孙世龙 @ 2020-05-09  8:28 UTC (permalink / raw)
  To: xenomai

Hi,
     Could std::atomic<T> be shared bettween rt thread and nrt thread?
     Is it cause latency problem?
     Is it cause rt thread to switch to secondary mode?


     Thank you for your attention.
     Look forward to hearing from you.

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

* Re: Could std::atomic<T> be shared bettween rt thread and nrt thread?
  2020-05-09  8:28 Could std::atomic<T> be shared bettween rt thread and nrt thread? 孙世龙
@ 2020-05-11  6:40 ` Jan Kiszka
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kiszka @ 2020-05-11  6:40 UTC (permalink / raw)
  To: 孙世龙, xenomai

On 09.05.20 10:28, 孙世龙 via Xenomai wrote:
> Hi,
>       Could std::atomic<T> be shared bettween rt thread and nrt thread?
>       Is it cause latency problem?
>       Is it cause rt thread to switch to secondary mode?
> 

I'm not familiar with their implementation details. As long as they use 
architectural atomic instructions and no syscalls, this is safe.

The problem with runtime libraries - and that also applies to C++ - is 
that you need to know their internals in order to use them safely for 
time-critical code. It's out of scope for the Xenomai project, we only 
provide that best-effort detection mechanism (SIGDEBUG).

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


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

end of thread, other threads:[~2020-05-11  6:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-09  8:28 Could std::atomic<T> be shared bettween rt thread and nrt thread? 孙世龙
2020-05-11  6:40 ` Jan Kiszka

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.