linux-mips
[Top] [All Lists]

Re: userspace spinlocks

To: Florian Lohoff <flo@rfc822.org>
Subject: Re: userspace spinlocks
From: Jun Sun <jsun@mvista.com>
Date: Mon, 30 Oct 2000 09:51:06 -0800
Cc: linux-mips@oss.sgi.com
References: <20001030151736.C2687@paradigm.rfc822.org>
Sender: owner-linux-mips@oss.sgi.com
Florian Lohoff wrote:
> 
> OTOH - Where are they normally implemented ? libc ? macro ? 

As far I know, they ether use atomic instructions such as ll/sc or use
kernel trap to emulate atomic operations.  I am not sure if other means
are possible because userland cannot disable interrupts or prevent
context switch.

> Could
> there be a runtime linking thing with a cpu detection wether we
> have ll/sc or not ?
>

This is a wonderful idea.  It should incorporate into future MIPS CPU
support structure.
 
Jun

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