On Friday 02 June 2006 05:12, Neil Perrin wrote: > I believe RW_LOCK_HELD checks it's not held by the calling thread only. > Note, a thread should not doubly read lock the same lock as > a write lock from another thread between the 2 would deadlock.
Ok, that makes sense. Thanks :) I'm assuming RW_WRITE_HELD() and MUTEX_HELD() also only checks if it's held by the calling thread (I couldn't find any documentation on this, and the implementation of the RW_xxx_HELD() macros weren't very easy to understand :p) Oh well... now I only have to figure out a way to emulate this with POSIX threads.. :)