Re: __atomic_test_and_set() and mips o32 - help wanted

Simon Burge <[email protected]> Mon, 17 Nov 2025 14:51:56 +1100
Newsgroups gmane.os.netbsd.ports.mips.devel,gmane.os.netbsd.devel.toolchain
Message-ID <[email protected]>
matthew green wrote:

> i'm not sure what the right thing to do here is.  it's not clear
> to me that the actual old 32-bit hardware can do this at all, but
> there are now explicit calls to this builtin.  GCC configury tries
> to find and notice it's missing, but libstdc++ still has a couple
> of calls to it directly in it's "test_and_set()".
>
>
> anyone have a good idea?

MIPS1 has no ll/sc or any other atomic primatives.  SMP R3000
boxes (eg DECsystem 54x0) used external hardware for this.

Seems like RAS (see rasctl(2)) might be the only (simple?)
option for MIPS1/o32 ?

Cheers,
Simon.