On Tue, Mar 4, 2014, at 07:59 AM, andy pugh wrote:
> On 4 March 2014 12:52, Stuart Stevenson <[email protected]> wrote:
> 
> > Gentlemen,
> >   It would help me understand and follow some of the current threads if I
> > knew the definition of atomic as used in this context.
> 
> 
> It refers to the original meaning of "atomic", "can not be cut".
> 
> Unless steps are taken to prevent it, it would be possible for the base
> thread to interrupt the servo thread while it was half-way through writing
> a new value to a variable, the value read from memory would be some bytes
> from the new number combined with some bytes from the old number. The value
> read would potentially be completely wrong.

Just to clarify - individual variables are already atomic.  We do not have to
worry about "some bytes from the new number combined with some 
bytes from the old number".  That is a key attribute of HAL signals and
has been taken care of from day one.

> The problem is slightly more complicated here, as we need to make sure that
> complete sets of numbers that are related to each other are written as-one
> with no danger of an interrupting thread reading a bad combination.

That is the situation we are discussing - sets of more than one variable
(or HAL signal) that need to be transferred together.


-- 
  John Kasunich
  [email protected]

------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to