]> AND Private Git Repository - loba.git/blobdiff - process.h
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Cosmetics: move around some code.
[loba.git] / process.h
index dbf9b05a34c53cee4e2f95c96f4ce72c0a49e781..3e912f03c68186a860f3a16116f74018c93c7d06 100644 (file)
--- a/process.h
+++ b/process.h
@@ -21,6 +21,7 @@
 #include "msg_thread.h"
 #include "neighbor.h"
 #include "options.h"
 #include "msg_thread.h"
 #include "neighbor.h"
 #include "options.h"
+#include "synchro.h"
 
 class process {
 public:
 
 class process {
 public:
@@ -97,11 +98,14 @@ private:
     double real_load;           // current load
     double expected_load;       // expected load in bookkeeping mode
 
     double real_load;           // current load
     double expected_load;       // expected load in bookkeeping mode
 
+    mutex_t mutex;              // synchronization between threads
+    condition_t cond;
+
     // Load-balancing loop
     // Load-balancing loop
+    msg_thread* lb_thread;
     void load_balance_loop();
 
     // Simulate computation loop
     void load_balance_loop();
 
     // Simulate computation loop
-    msg_thread* compute_thread;
     void compute_loop();
 
     bool still_running();
     void compute_loop();
 
     bool still_running();