1 /* Copyright (c) 2008-2014. 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. */
7 #include "mc_model_checker.h"
8 #include "mc_page_store.h"
12 mc_model_checker_t mc_model_checker = NULL;
14 mc_model_checker_t MC_model_checker_new(pid_t pid, int socket)
16 mc_model_checker_t mc = xbt_new0(s_mc_model_checker_t, 1);
17 mc->pages = mc_pages_store_new();
18 mc->fd_clear_refs = -1;
19 MC_process_init(&mc->process, pid, socket);
20 mc->hosts = xbt_dict_new();
24 void MC_model_checker_delete(mc_model_checker_t mc)
26 mc_pages_store_delete(mc->pages);
28 xbt_dynar_free(&mc->record);
29 MC_process_clear(&mc->process);
30 xbt_dict_free(&mc->hosts);
33 unsigned long MC_smx_get_maxpid(void)
36 MC_process_read_variable(&mc_model_checker->process, "simix_process_maxpid",
37 &maxpid, sizeof(maxpid));