Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Bugfix: save the ucontext of each running thread in a per context basis.
[simgrid.git] / src / replay / replay.h
1 /* Specific user API allowing to replay traces without context switches */
2
3 /* Copyright (c) 2010. The SimGrid Team.
4  * All rights reserved.                                                     */
5
6 /* This program is free software; you can redistribute it and/or modify it
7  * under the terms of the license (GNU LGPL) which comes with this package. */
8
9 #ifndef TRACE_REPLAY_H_
10 #define TRACE_REPLAY_H_
11
12 #include "xbt/dynar.h"
13 #include "simix/simix.h"
14 #include "simix/context.h"
15
16 /* function used in each process */
17 int replay_runner(int argc, char *argv[]);
18 /* initialize my factory */
19 void statem_factory_init(smx_context_factory_t * factory);
20
21 void SG_replay_init(int *argc, char **argv);
22
23 typedef void *(*replay_init_func_t)(int argc, char *argv[]);
24 typedef void (*replay_run_func_t)(void* data,void *syscall_result);
25 typedef void (*replay_fini_func_t)(void* data);
26
27 replay_init_func_t replay_func_init;
28 replay_run_func_t replay_func_run;
29 replay_fini_func_t replay_func_fini;
30 void SG_replay_set_functions(replay_init_func_t init, replay_run_func_t run,replay_fini_func_t fini);
31
32 void SG_replay(const char *environment_file, const char *deploy_file);
33
34
35 /* Trace parsing logic */
36 typedef struct s_replay_trace_reader *replay_trace_reader_t;
37
38 replay_trace_reader_t replay_trace_reader_new(const char*filename);
39 const char * const *replay_trace_reader_get(replay_trace_reader_t reader);
40 void replay_trace_reader_free(replay_trace_reader_t *reader);
41 const char *replay_trace_reader_position(replay_trace_reader_t reader);
42
43
44 #endif /* TRACE_REPLAY_H_ */