lkml.org 
[lkml]   [2008]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: BUG: lock held when returning to user space
From
Date

On Thu, 2008-03-13 at 18:39 +0100, Peter Zijlstra wrote:

> > These need to be removed, but the usage is clearly not compatible with
> > the mutex API ..
> >
> > If you convert them to atomic counts then you loose the sleeping aspect
> > of the semaphore, which you'd have to add back somehow.
> >
> > The only API that seems straight forward is using complete's .. Then you
> > get an atomic count and all the sleeping function calls you might want..
> > (include/linux/completion.h) The problem with complete's is that you
> > can't start them out at "1" or "completed" unless you actually run
> > complete() once during initialization (that's kind of ugly) ..
>
> A simple waitqueue would work.

I was just mulling over what the most straight forward way would be.. I
thought about wait queues, but the API didn't seem as easy to use a
completes..

Daniel



\
 
 \ /
  Last update: 2008-03-13 18:59    [W:0.053 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site