HAL processes run in strict sequence, so most realtime components
probably don't access the same memory at the same time.

The exceptions are where there are both base threads and a servo
thread, and possibly where there is access to HAL pins from user-space
(and, maybe from the G-code (but I think that G-code HAL pin access is
read-only))

From what I have seen of the functions that update in a base thread
(stepgen, encoder, etc) there is a fair degree of care taken to avoid
the base thread treading on the toes of the servo thread.
There is, conversely, no car taken by the GUIs that access HAL pins,
but in most cases that probably doesn't matter.

But I think it would take exhaustive testing with real hardware to
check if volatile is needed and even then it would be hard to be sure
that you had tested all corners of the behaviour.

I get the feeling that the "volatile" directives were put in as a
prophylactic , best-effort measure. They may or may not be useful. But
are they harmful?

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to