* 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;
|
||||
set_notification(NULL, notification, TRANSACTION_WRITTEN, notify_sync,
|
||||
cache);
|
||||
|
||||
ConditionVariableEntry<block_cache> entry;
|
||||
entry.Add(cache);
|
||||
|
||||
add_notification(cache, ¬ification, TRANSACTION_WRITTEN, false);
|
||||
|
||||
// wait for condition
|
||||
ConditionVariableEntry<block_cache> entry;
|
||||
entry.Wait(cache);
|
||||
// wait for notification hook to be called
|
||||
entry.Wait();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user