]> AND Public Git Repository - simgrid.git/blobdiff - src/mc/mc_server.h
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] C++ification of memory_map.cpp
[simgrid.git] / src / mc / mc_server.h
index a8ea31bcb30d98b31bc323f8ba3785dc6b183263..e2c1a2300a948bcb6be48c5fccb4f40320c4614b 100644 (file)
@@ -4,19 +4,35 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#ifndef MC_SERVER_H
-#define MC_SERVER_H
+#ifndef SIMGRID_MC_SERVER_H
+#define SIMGRID_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"
+#include "mc_exit.h"
 
 SG_BEGIN_DECL()
 
-#define MC_SERVER_ERROR 127
+#define MC_SERVER_ERROR SIMGRID_ERROR
 
 typedef struct s_mc_server s_mc_server_t, *mc_server_t;
 
 extern mc_server_t mc_server;
 
+XBT_INTERNAL void MC_server_wait_client(mc_process_t process);
+XBT_INTERNAL void MC_server_simcall_handle(mc_process_t process, unsigned long pid, int value);
+
+XBT_INTERNAL void MC_server_loop(mc_server_t server);
+
 SG_END_DECL()
 
 #ifdef __cplusplus
@@ -33,7 +49,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();