Added VMCache::SwitchFromReadLock(), atomically unlocking a read lock and
starting to lock the cache. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34936 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c4f9831292
commit
77690f288e
@ -73,6 +73,7 @@ public:
|
||||
inline bool Lock();
|
||||
inline bool TryLock();
|
||||
inline bool SwitchLock(mutex* from);
|
||||
inline bool SwitchFromReadLock(rw_lock* from);
|
||||
void Unlock();
|
||||
inline void AssertLocked();
|
||||
|
||||
@ -220,6 +221,13 @@ VMCache::SwitchLock(mutex* from)
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
VMCache::SwitchFromReadLock(rw_lock* from)
|
||||
{
|
||||
return mutex_switch_from_read_lock(from, &fLock) == B_OK;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
VMCache::AssertLocked()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user