* 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:
Ingo Weinhold
2007-08-09 20:08:25 +00:00
parent 227402f2bf
commit 279c6b76dc
9 changed files with 142 additions and 60 deletions
+2
View File
@@ -152,6 +152,8 @@ struct thread {
int32 flags;
} sem;
struct PrivateConditionVariable *condition_variable;
struct {
sem_id write_sem;
sem_id read_sem;
+10
View File
@@ -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;