tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: would a mutex_wait be useful?
Hi,
On Tue, Nov 04, 2008 at 10:18:29AM -0800, Matt Thomas wrote:
> On Nov 4, 2008, at 3:50 AM, Mindaugas Rasiukevicius wrote:
>
> >Matt Thomas <matt%3am-software.com@localhost> wrote:
> >>
> >>
> >>I'd like to be able to do a mutex_enter(9) which could be
> >>interruptable.
> >>If interrupted, it would return the error why it was interrupted.
> >
> >Where/when do you need interruptible mutex?
>
> I was replacing code in arm32/mem.c with a home grown lock with
> mutex_enter.
> Relatively easy to do except it no longer does PCATCH.
On x86 I ditched PCATCH and just used a mutex because the code within the
mutex waits only for vm/pmap locks or page faults. Any wait will not be long
term.
I screwed up and initialized the mutex in mm_open(). At the moment we allow
concurrent opens.
Andrew
Home |
Main Index |
Thread Index |
Old Index