* This should fix a deadlock as reported by bga.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24793 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+6
-3
@@ -1369,11 +1369,14 @@ wait_for_notifications(block_cache *cache)
|
|||||||
cache_notification notification;
|
cache_notification notification;
|
||||||
set_notification(NULL, notification, TRANSACTION_WRITTEN, notify_sync,
|
set_notification(NULL, notification, TRANSACTION_WRITTEN, notify_sync,
|
||||||
cache);
|
cache);
|
||||||
|
|
||||||
|
ConditionVariableEntry<block_cache> entry;
|
||||||
|
entry.Add(cache);
|
||||||
|
|
||||||
add_notification(cache, ¬ification, TRANSACTION_WRITTEN, false);
|
add_notification(cache, ¬ification, TRANSACTION_WRITTEN, false);
|
||||||
|
|
||||||
// wait for condition
|
// wait for notification hook to be called
|
||||||
ConditionVariableEntry<block_cache> entry;
|
entry.Wait();
|
||||||
entry.Wait(cache);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user