Attempt to atomically convert a read lock (acquired by a successful call to lockRead, lockReadReserveWrite, or tryLockRead) to a write lock. Return 0 on success, and a non-zero value otherwise. If a write lock request is already pending, a non-zero value is immediately returned. If there are other active read locks, the call will block until all current read locks are released. Note that locks that were acquired through lockReadReserveWrite are guaranteed to succeed.
Declared in <bslmt_readerwriterlock.h>
int
tryUpgradeToWriteLock();