Subject: Re: CVS commit: syssrc
To: Ty Sarna <tsarna@endicor.com>
From: Jason R Thorpe <thorpej@zembu.com>
List: port-m68k
Date: 05/14/2000 18:37:53
[ sigh, finally getting back to this... ]

On Tue, May 02, 2000 at 10:41:24PM +0000, Ty Sarna wrote:

 > > Log Message:
 > > On the m68k, the most efficient type for __cpu_simple_lock_t is
 > > an unsigned char, since that is what the `tas' instruction uses.
 > > 
 > > While I'm here, implement the __cpu_simple_lock family of routines.
 > > Why?  One, because they're easy.  Two, so Steve can get master/slave
 > > MVME systems talking across the backplane.  :-)
 > 
 > Is this #ifdef MULTIPROCESSOR? You have to be careful not to use TAS on
 > some of our existing uniprocessor ports (at least amiga, and IIRC there
 > were others)

No, it's not restricted to MULTIPROCESSOR, tho nothing uses it in the
kernel if MULTIPROCESSOR is not set.

However, userland (specifically, threads packages, SQL databases, etc.)
use `tas', so if it's a problem on some specific platforms, then those
packages need to be fixed.

This was actually the main motivation for my adding these inlines
in the first place -- so that userland packages that do this sort
of thing can use vendor-supplied (that's us :-) routines.

Do the systems that have problems with `tas' also have problems with
`cas'?  If `cas' is okay, I can write a version that uses `cas' (tho
I think it might be one or two instructions longer :-)

-- 
        -- Jason R. Thorpe <thorpej@zembu.com>