On Thu, 24 May 2001, Joe deBlaquiere wrote:
> and those pesky little inlined code snippets...
>
> #define PT_EI extern inline
>
> PT_EI long int
> testandset (int *spinlock)
>
> which of course uses ll/sc if your world is built for _MIPS_ISA >=
> _MIPS_ISA_MIPS2
The glibc's non-inlined _test_and_set() also uses ll/sc, if built for
_MIPS_ISA >= _MIPS_ISA_MIPS2. We might remove the inline version of
_test_and_set() for _MIPS_ISA == _MIPS_ISA_MIPS1 (I forgot about this one
previously, sorry) from <sys/tas.h>, but at a cost of an additional
function call. I'm not sure if that's fine performance-wise at this
moment...
However, when I finish my implementation of a _test_and_set() syscall, it
will be perfectly fine and even necessary to remove the inline wrapper for
_MIPS_ISA == _MIPS_ISA_MIPS1 -- the only reason the wrapper is needed now
is the incompatibility of the arguments of sysmips() and _test_and_set().
The good news is I already started the implementation -- hopefully it'll
be ready over this weekend and the never-ending discussion about
sysmips(MIPS_ATOMIC_SET) will be over.
Maciej
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
|