linux-mips
[Top] [All Lists]

Re: MIPS_ATOMIC_SET in sys_sysmips()

To: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Subject: Re: MIPS_ATOMIC_SET in sys_sysmips()
From: Harald Koerfgen <Harald.Koerfgen@home.ivm.de>
Date: Tue, 19 Dec 2000 18:03:01 +0100 (CET)
Cc: linux-mips@oss.sgi.com, Ralf Baechle <ralf@uni-koblenz.de>, Jun Sun <jsun@mvista.com>
In-reply-to: <Pine.GSO.3.96.1001219140739.10024F-100000@delta.ds2.pg.gda.pl>
Organization: none
Reply-to: Harald Koerfgen <Harald.Koerfgen@home.ivm.de>
Sender: owner-linux-mips@oss.sgi.com
On 19-Dec-00 Maciej W. Rozycki wrote:
> On Mon, 18 Dec 2000, Jun Sun wrote:
>> What do we offer to machines without ll/sc?
> 
>  I asked Ralf for a clarification of the sysmips(MIPS_ATOMIC_SET, ...) 
> call before I write better code.  No response so far.  I'm now really
> cosidering implementing the Ultrix atomic_op() syscall -- at least it has
> a well-known defined behaviour. 

Another possibility would be to rely on the userland ll/sc emulation in the
kernel. The one in the linux-vr tree seems to be working well and can easily be
backported to Linux/MIPS.

Advantage: userland binary compatibility.
Disadvantage: possibility for a lot of context switches for userland atomic
operations.
 
Having a sysmips(MIPS_ATOMIC_SET, ...) or atomic_op() solution would probably a
lot faster.

Maybe we should implement both :)

-- 
Regards,
Harald

<Prev in Thread] Current Thread [Next in Thread>