It touches the _spinlock_.
Which may no longer be a spinlock, since the waiter may never have blocked
on it at all, and may have just succeeded directly with the atomic
decrement of the counter.
Trust me, semaphores on the stack do not work unless there is some other
synchronization above the semaphore level (or unless we make semaphores
much slower, ie we take the spinlock even in the fast path).
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/