[haiku-commits] r33736 - haiku/trunk/src/tests/add-ons/kernel/kernelland_emu

  • From: mmlr@xxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 23 Oct 2009 01:50:16 +0200 (CEST)

Author: mmlr
Date: 2009-10-23 01:50:15 +0200 (Fri, 23 Oct 2009)
New Revision: 33736
Changeset: http://dev.haiku-os.org/changeset/33736/haiku

Modified:
   haiku/trunk/src/tests/add-ons/kernel/kernelland_emu/condition_variable.cpp
   haiku/trunk/src/tests/add-ons/kernel/kernelland_emu/device_manager.cpp
Log:
Fix libkernelland_emu build after ConditionVariable and devfs changes.


Modified: 
haiku/trunk/src/tests/add-ons/kernel/kernelland_emu/condition_variable.cpp
===================================================================
--- haiku/trunk/src/tests/add-ons/kernel/kernelland_emu/condition_variable.cpp  
2009-10-22 23:14:10 UTC (rev 33735)
+++ haiku/trunk/src/tests/add-ons/kernel/kernelland_emu/condition_variable.cpp  
2009-10-22 23:50:15 UTC (rev 33736)
@@ -173,7 +173,7 @@
        fObjectType = NULL;
 
        if (!fEntries.IsEmpty())
-               _NotifyChecked(true, B_ENTRY_NOT_FOUND);
+               _NotifyLocked(true, B_ENTRY_NOT_FOUND);
 }
 
 
@@ -194,12 +194,18 @@
 
 
 void
-ConditionVariable::_Notify(bool all, bool threadsLocked)
+ConditionVariable::_Notify(bool all, bool threadsLocked, status_t result)
 {
        MutexLocker locker(sConditionVariablesLock);
 
-       if (!fEntries.IsEmpty())
-               _NotifyChecked(all, B_OK);
+       if (!fEntries.IsEmpty()) {
+               if (result > B_OK) {
+                       panic("tried to notify with invalid result %ld\n", 
result);
+                       result = B_ERROR;
+               }
+
+               _NotifyLocked(all, result);
+       }
 }
 
 
@@ -207,7 +213,7 @@
        thread lock held.
 */
 void
-ConditionVariable::_NotifyChecked(bool all, status_t result)
+ConditionVariable::_NotifyLocked(bool all, status_t result)
 {
        // dequeue and wake up the blocked threads
        while (ConditionVariableEntry* entry = fEntries.RemoveHead()) {

Modified: haiku/trunk/src/tests/add-ons/kernel/kernelland_emu/device_manager.cpp
===================================================================
--- haiku/trunk/src/tests/add-ons/kernel/kernelland_emu/device_manager.cpp      
2009-10-22 23:14:10 UTC (rev 33735)
+++ haiku/trunk/src/tests/add-ons/kernel/kernelland_emu/device_manager.cpp      
2009-10-22 23:50:15 UTC (rev 33736)
@@ -13,9 +13,9 @@
 
 
 extern "C" status_t
-devfs_unpublish_partition(const char *path)
+devfs_unpublish_partition(const char *devicePath, const char *name)
 {
-       printf("unpublish partition: %s\n", path);
+       printf("unpublish partition: %s/%s\n", devicePath, name);
        return B_OK;
 }
 


Other related posts:

  • » [haiku-commits] r33736 - haiku/trunk/src/tests/add-ons/kernel/kernelland_emu - mmlr