tech-kern archive

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

Re: would a mutex_wait be useful?


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 <> 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

I screwed up and initialized the mutex in mm_open(). At the moment we allow
concurrent opens.


Home | Main Index | Thread Index | Old Index