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:
@@ -73,6 +73,7 @@ public:
|
|||||||
inline bool Lock();
|
inline bool Lock();
|
||||||
inline bool TryLock();
|
inline bool TryLock();
|
||||||
inline bool SwitchLock(mutex* from);
|
inline bool SwitchLock(mutex* from);
|
||||||
|
inline bool SwitchFromReadLock(rw_lock* from);
|
||||||
void Unlock();
|
void Unlock();
|
||||||
inline void AssertLocked();
|
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
|
void
|
||||||
VMCache::AssertLocked()
|
VMCache::AssertLocked()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user