Benito van der Zander wrote:

In the end I stuck in code to increment/decrement a counter, and looked for it to be explicitly 0 or 1.

Do you need to put a memory barrier around that, or does the critical section take care of that?

I used the interlocked increment/decrement, which- as I understand it- should handle membar itself on architectures that can benefit from it.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to