Subject: Re: pthreads
To: Tero Manninen <nix@stekt.oulu.fi>
From: Ty Sarna <tsarna@endicor.com>
List: amiga
Date: 06/11/1995 14:38:02
Tero Manninen wrote:
> 
> What TAS instruction has to do with POSIX threads support? In my
> understanding it would be convenient in multiprocessor environments
> but in the case of Amiga TAS is not needed (maybe that is true in
> other m68k-ports too (and I suspect that there is no multiprocessor
> aware NetBSD :-))).

Some kind of TAS-like (or atomic mem<->reg/mem<->mem exchange or
whatever) is needed.  However, I never noticed (until Timo pointed it
out) that the BCLR/BSET instructions set condition codes based on the
contenets BEFORE the operation, rather than the result like most normal
instructions, and can thus be used as a TAS. So my answer was bogus.