[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: |
Sun, 21 Mar 2004 19:42:20 +0100 |
User-agent: |
Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI) |
At Tue, 14 Oct 2003 16:00:35 -0700,
Volkmar Uhlig wrote:
>
> After reading your initial scenario again there is a rather simple
> solution--use zero timeouts. Instead of storing the cancel flag you
> store the intended send timeout value, which could be zero. Of course
> you still run into a race on MP if you don't use some synchronization
> primitive, but that is a different issue you have to deal with anyway.
> This solution assumes that you _only_ want to ensure that the thread
> does not block.
Mmmh, that might even work. Although it is quite finicky. However,
it can not work "instead" of a cancel flag, but in addition.
To-be-canceled thread could do:
1. Set desired IPC timeout
2. Check cancel flag
3. Ipc()
4. If timeout, check cancel flag.
The cancelling thread can then make the canceled thread jump into a
routine so that it resets its own timeout value and sets the cancel
flag.
I am not sure about MP synchronization, but I wasn't sure about it
before, either.
The by far easiest approach would be to have an in-kernel flag that
can be set with ExchangeRegisters and that is checked (and cleared) in
the Ipc() system call. At least it defines semantically what feature
I want to have.
I'll look further into the timeout approach.
Thanks,
Marcus
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: deferred cancellation of ipc,
Marcus Brinkmann <=