linux-mips
[Top] [All Lists]

Re: Will ll/sc work from user space?

To: David Daney <ddaney@avtrex.com>
Subject: Re: Will ll/sc work from user space?
From: Dominic Sweetman <dom@mips.com>
Date: Fri, 19 Sep 2003 22:11:37 +0200
Cc: linux-mips@linux-mips.org
In-reply-to: <3F6A4E41.1090100@avtrex.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <3F6A4E41.1090100@avtrex.com>
Sender: linux-mips-bounce@linux-mips.org
David,

> Q:  Will ll/sc instructions work from a linux user process ?

As Maciej says, yes.

> If so What happens if there is a context switch between the two?

The sc fails.

It fails whenever any interrupt or other exception (perhaps a VM
event, for example) happens after the ll but before the sc.

> What happens if the memory location is paged out and then back into a 
> different physical page?

If that happens between the ll and the sc, then you must certainly
have got an interrupt.

--
Dominic Sweetman
MIPS Technologies


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