* Use condition variables when waiting for busy pages or busy caches.
* Removed a few instances where the page state was set busy directly after allocating it. This is a no-op, since a page is always busy after allocation. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21875 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -152,6 +152,8 @@ struct thread {
|
||||
int32 flags;
|
||||
} sem;
|
||||
|
||||
struct PrivateConditionVariable *condition_variable;
|
||||
|
||||
struct {
|
||||
sem_id write_sem;
|
||||
sem_id read_sem;
|
||||
|
||||
@@ -133,6 +133,16 @@ enum {
|
||||
CACHE_TYPE_NULL
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include <condition_variable.h>
|
||||
|
||||
struct vm_dummy_page : vm_page {
|
||||
ConditionVariable<vm_page> busy_condition;
|
||||
};
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
// vm_cache
|
||||
typedef struct vm_cache {
|
||||
mutex lock;
|
||||
|
||||
Reference in New Issue
Block a user