[fpc-devel] M68k: important milestone reached
Sven Barth
pascaldragon at googlemail.com
Tue Feb 25 09:52:21 CET 2014
Am 25.02.2014 09:30, schrieb Michael Schnell:
> 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.
No, because the InterlockedIncrement/-Decrement return *by definition*
the value increased/decreased by one, so that the code which uses it
*can* rely on this.
>
> 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.
I've also found some semaphore related sites regarding m68k. I'm sure
that I'll be able to come up with something useable :)
Regards,
Sven
More information about the fpc-devel
mailing list