* Detemplatized ConditionVariable{Entry}. Merged them with their

respective Private* base class.
* Changed sigwait() and sigsuspend() to use thread_block() instead of a
  condition variable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25100 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-04-22 18:32:15 +00:00
parent b95f6d4710
commit 6cef245eca
15 changed files with 149 additions and 221 deletions
+4 -4
View File
@@ -184,7 +184,7 @@ read_into_cache(file_cache_ref *ref, void *cookie, off_t offset,
size_t numBytes = PAGE_ALIGN(pageOffset + bufferSize);
vm_page *pages[MAX_IO_VECS];
ConditionVariable<vm_page> busyConditions[MAX_IO_VECS];
ConditionVariable busyConditions[MAX_IO_VECS];
int32 pageIndex = 0;
// allocate pages for the cache and mark them busy
@@ -324,7 +324,7 @@ write_to_cache(file_cache_ref *ref, void *cookie, off_t offset,
vm_page *pages[MAX_IO_VECS];
int32 pageIndex = 0;
status_t status = B_OK;
ConditionVariable<vm_page> busyConditions[MAX_IO_VECS];
ConditionVariable busyConditions[MAX_IO_VECS];
// ToDo: this should be settable somewhere
bool writeThrough = false;
@@ -622,7 +622,7 @@ cache_io(void *_cacheRef, void *cookie, off_t offset, addr_t buffer,
return status;
if (page->state == PAGE_STATE_BUSY) {
ConditionVariableEntry<vm_page> entry;
ConditionVariableEntry entry;
entry.Add(page);
locker.Unlock();
entry.Wait();
@@ -790,7 +790,7 @@ cache_prefetch_vnode(struct vnode *vnode, off_t offset, size_t size)
if (page != NULL) {
if (page->state == PAGE_STATE_BUSY) {
// if busy retry again later
ConditionVariableEntry<vm_page> entry;
ConditionVariableEntry entry;
entry.Add(page);
mutex_unlock(&cache->lock);
entry.Wait();