Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
5ea7a48e4e06f545aecf860104fd895902ec059a
[simgrid.git] / src / mc / mc_process.h
1 /* Copyright (c) 2008-2014. The SimGrid Team.
2  * All rights reserved.                                                     */
3
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. */
6
7 #ifndef MC_PROCESS_H
8 #define MC_PROCESS_H
9
10 #include "simgrid_config.h"
11
12 #include <sys/types.h>
13
14 #include "mc_forward.h"
15 #include "mc_memory_map.h"
16
17 SG_BEGIN_DECL()
18
19 typedef enum {
20   MC_PROCESS_NO_FLAG = 0,
21   MC_PROCESS_SELF_FLAG = 1,
22 } e_mc_process_flags_t;
23
24 /** Representation of a process
25  */
26 struct s_mc_process {
27   e_mc_process_flags_t process_flags;
28   pid_t pid;
29   memory_map_t memory_map;
30   void *maestro_stack_start, *maestro_stack_end;
31   mc_object_info_t libsimgrid_info;
32   mc_object_info_t binary_info;
33   mc_object_info_t* object_infos;
34   size_t object_infos_size;
35 };
36
37 void MC_process_init(mc_process_t process, pid_t pid);
38 void MC_process_clear(mc_process_t process);
39
40 mc_object_info_t MC_process_find_object_info(mc_process_t process, void* ip);
41 dw_frame_t MC_process_find_function(mc_process_t process, void* ip);
42
43 SG_END_DECL()
44
45 #endif