On 24.02.2014 18:06, Karoly Balogh (Charlie/SGR) wrote:
Hi,

On Mon, 24 Feb 2014, Sven Barth wrote:

Am 24.02.2014 17:29, schrieb Michael Schnell:
On 02/24/2014 03:41 PM, Sven Barth wrote:
  are normally OS independant as they normally use corresponding CPU
instructions.
Of course for simple stuff like inc/dec I can (better) use atomic 68 K
instruction :-) .
Of course. But e.g. not every Coldfire architecture supports them. For this
reason I introduced the cpuflags CPUM86K_HAS_TAS and CPUM68K_HAS_CAS which are
set if the test-and-set and the compare-and-swap instructions are available
respectively (68000 only has the TAS, but not the CAS, 68020 and 68040 have
CAS and TAS while Coldfire ISA-A and ISA-A+ have neither and ISA-B and ISA-C
only have TAS). When I find the time I will implement the Interlocked*
functions accordingly :)

Keep in mind that at least TAS is (basically) forbidden on Amiga, because
it's incompatible with several HW implementations by Commodore and by how
DMA accesses are generated by various bus extensions (Zorro II) or custom
chips (eg. Agnus) in respect to the CPU and/or CPU expansion cards.

The same applies to CAS/CAS2, I guess. Basically anything which tries to
do an atomic read-write cycle is not guaranteed to work correctly on
Amiga.

More info:
http://amigadev.elowar.com/read/ADCD_2.1/Hardware_Manual_guide/node012B.html
http://www.devili.iki.fi/mirrors/haynie/systems/amiga2k/docs/tasa2k.pdf
http://eab.abime.net/showthread.php?t=58493

So if you decide to implement anything related to this, better make it
OS specific too. :) Thank you.

Thank you for the warning. ^^ *marks the mail*

Regards,
Sven

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

Reply via email to