Re: [DOC PATCH] semaphore documentation
From: David Woodhouse
Date: Tue Apr 15 2008 - 04:25:24 EST
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/