search for: dp_config_rwlock

Displaying 1 result from an estimated 1 matches for "dp_config_rwlock".

2007 Nov 24
19
R/W lock portability issue
...y, it would return true if *any* thread was holding the lock, and false if there were no threads holding the lock. This way ASSERTs never failed). However, now there is a small bit of code that actually relies on RW_LOCK_HELD() working correctly: boolean_t need_lock = !RW_LOCK_HELD(&dp->dp_config_rwlock); if (need_lock) rw_enter(&dp->dp_config_rwlock, RW_READER); I can''t think of a way to emulate this functionality with pthreads without incurring a huge overhead when locking... Any ideas? Thanks, Ricardo -- <http://www.sun.com> *Ricardo Manuel Correia* Lust...