Kaluga: Fix bug with new driver model code
authorDaniel Schwyn <schwyda@student.ethz.ch>
Thu, 7 Sep 2017 14:14:05 +0000 (16:14 +0200)
committerDaniel Schwyn <schwyda@student.ethz.ch>
Thu, 7 Sep 2017 14:14:05 +0000 (16:14 +0200)
The driver domain ID was incremented too late, resulting in a race condition.

Signed-off-by: Daniel Schwyn <schwyda@student.ethz.ch>

usr/kaluga/driver_domains.c

index 936d626..746a712 100644 (file)
@@ -75,8 +75,9 @@ struct domain_instance* instantiate_driver_domain(coreid_t where) {
         USER_PANIC_ERR(err, "call failed.");
     }
     struct domain_instance* di = ddomain_create_domain_instance(did);
+    did++;
+    
     wait_for_id(di);
 
-    did++;
     return di;
 }