Messages in this thread | | | Subject | Re: [DOC PATCH] semaphore documentation | From | David Woodhouse <> | Date | Tue, 15 Apr 2008 09:24:29 +0100 |
| |
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
| |