[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: deferred cancellation of ipc

From: Marcus Brinkmann
Subject: Re: deferred cancellation of ipc
Date: Tue, 14 Oct 2003 15:10:57 +0200
User-agent: Mutt/1.5.4i

On Tue, Oct 14, 2003 at 02:24:27PM +0200, Niels M?ller wrote:
> Cool. How do you deal with the return address? [ It's fine with me if
> you don't feel like digging into this detail now, I'm just curious
> about how it works ]. Hmm, as long as the calling thread is in the
> same address space, I guess one could (i) stop the target thread from
> executing (how?), (ii) call ExchangeRegisters to mung the IP and
> perhaps SP (iii) store the old IP somewhere in the address space, and
> (iv) let the thread run again. But perhaps there's a simpler way to do
> it?

I think that's how it works.  ExchangeRegister, as you can easily find out
in the specs, allows you to stop and resume a thread, cancel/abort ipc
send/receive operations, find out if the thread is in an ipc operations,
set and get the IP, SP, processor flags, as well as the pager and the user
defined handle.

> I think it may be possible to distinguish between these two cases, but
> to do it one gets one's hands dirty in the architecture-specific
> details of the L4-spec. Assume the l4_ipc system call puts its return
> value into machine register X when returning, and that after a
> cancelled ipc, X will contain a value L4_CANCEL iff the L4 ipc operation
> was cancelled.

There are things that you can do, and they are very low level and dirty. 
I am not sure that it is supposed to be that way, though.

For now, I think I found a way to implement what I want to implement without
this problem solved.  But it's still an interesting problem.  However,
rather than finding a very complicated hack I would prefer to hear what the L4
guys think of it.  If there is no clean solution, it might be acceptable to
simply try to avoid this problem by using a different design (if that is
always possible).


`Rhubarb is no Egyptian god.' GNU      http://www.gnu.org    address@hidden
Marcus Brinkmann              The Hurd http://www.gnu.org/software/hurd/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]