lkml.org 
[lkml]   [2008]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [DOC PATCH] semaphore documentation
From
Date
On Sat, 2008-04-12 at 08:12 -0600, Matthew Wilcox wrote:
> As I wrote in one of the comments, we have places in the kernel which
> know that even though they're in a non-sleeping context, there is at
> least one more token left in the semaphore. One place this bit me was
> in start_kernel(). We disable interrupts and then call lock_kernel()
> which calls down(). Since we're in start_kernel(), we know there's
> nothing else running and this is perfectly safe. But a might_sleep()
> would warn bogusly.

I would have thought they'd use down_trylock() in that case.

--
dwmw2



\
 
 \ /
  Last update: 2008-04-15 10:27    [W:0.042 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site