But then we call wake_up(), we wake-up the second thread.
Now the second thread either acquires the lock, or it sets the value
back to 1.
This should be OK.
> Actually why do you want the wake_me_up field ?
I thought that would simplify the code. But unfortunately,
write_lock_trylock() is not atomic, and this means my proposal is
impossible.
I'm searching for another solution.
-- Manfred- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/