Hi,


Just wondering how to upgrade a read lock to a write lock, say I do a find_or_create_item_in_queue()

switch_thread_rwlock_rdlock(lock);

find an item from queue, if not found, create one

switch_thread_rwlock_upgrade_to_wrlock(lock);

write
switch_thread_rwlock_unlock(lock);

Thanks
-- 
Seven Du
About: http://about.me/dujinfang
Blog: http://www.dujinfang.com
Proj:  http://www.freeswitch.org.cn
Sent with Sparrow