1 /* Copyright (c) 2015. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
14 #define MC_SERVER_ERROR 127
16 typedef struct s_mc_server s_mc_server_t, *mc_server_t;
18 extern mc_server_t mc_server;
20 /** Initialise MC server
22 * @param PID of the model-checked process
23 * @param socket file descriptor for communication with the model-checked process
24 * @return 0 on success
26 int MC_server_init(pid_t pid, int socket);
28 /** Execute the MC server
30 * @return Status code (can be used with `exit()`)
32 void MC_server_run(void);
44 s_mc_server(pid_t pid, int socket);
48 void resume(mc_process_t process);
52 void handle_signals();
53 void handle_waitpid();
54 void on_signal(const struct signalfd_siginfo* info);