This in many cases is not a problem, as the result shows either the state before or after the interrupt and so the atomic variable itself is not a problem.

Of course the user code needs to take into account that the result already might be changed in the Pascal instruction. But I thinks this is obvious, anyway.

To do a semaphore the state of which might be critical to be known at a certain point you can do something like

 bclr #0, (A0)
 move ccr, D0

here the inverted state of the bit before the operation will be in bit 2 of D0.

-Michael

_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to