Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' into mc
[simgrid.git] / src / mc / mc_server.h
index 559d085..e07d6e6 100644 (file)
@@ -7,7 +7,17 @@
 #ifndef MC_SERVER_H
 #define MC_SERVER_H
 
+#include <poll.h>
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#include <sys/signalfd.h>
+#include <sys/types.h>
+
 #include <xbt/misc.h>
+#include "mc_process.h"
 
 SG_BEGIN_DECL()
 
@@ -17,19 +27,10 @@ typedef struct s_mc_server s_mc_server_t, *mc_server_t;
 
 extern mc_server_t mc_server;
 
-/** Initialise MC server
- *
- * @param  PID of the model-checked process
- * @param socket file descriptor for communication with the model-checked process
- * @return 0 on success
- */
-int MC_server_init(pid_t pid, int socket);
+void MC_server_wait_client(mc_process_t process);
+void MC_server_simcall_handle(mc_process_t process, unsigned long pid, int value);
 
-/** Execute the MC server
- *
- *  @return Status code (can be used with `exit()`)
- */
-void MC_server_run(void);
+void MC_server_loop(mc_server_t server);
 
 SG_END_DECL()
 
@@ -47,7 +48,7 @@ public:
   void exit();
   void resume(mc_process_t process);
   void loop();
-  void handle_events();
+  bool handle_events();
 protected:
   void handle_signals();
   void handle_waitpid();