Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
explain in comment why we don't even test pthread on windows
[simgrid.git] / src / include / surf / trace_mgr.h
1 /* Copyright (c) 2004-2007, 2009-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 _SURF_TMGR_H
8 #define _SURF_TMGR_H
9
10 #include "xbt/heap.h"
11 #include "xbt/dynar.h"
12 #include "surf/maxmin.h"
13 #include "surf/datatypes.h"
14 #include "simgrid/platf_interface.h"
15
16 SG_BEGIN_DECL()
17
18 /* Creation functions */
19 XBT_PUBLIC(tmgr_fes_t) tmgr_history_new(void);
20 XBT_PUBLIC(void) tmgr_history_free(tmgr_fes_t history);
21
22 XBT_PUBLIC(tmgr_trace_t) tmgr_empty_trace_new(void);
23 XBT_PUBLIC(void) tmgr_trace_free(tmgr_trace_t trace);
24 /**
25  * \brief Free a trace event structure
26  *
27  * This function frees a trace_event if it can be freed, ie, if it has the free_me flag set to 1. This flag indicates whether the structure is still used somewhere or not.
28  * \param  trace_event    Trace event structure
29  * \return 1 if the structure was freed, 0 otherwise
30 */
31 XBT_PUBLIC(int) tmgr_trace_event_free(tmgr_trace_iterator_t trace_event);
32
33 XBT_PUBLIC(tmgr_trace_iterator_t) tmgr_history_add_trace(tmgr_fes_t
34                                                       history,
35                                                       tmgr_trace_t trace,
36                                                       double start_time,
37                                                       unsigned int offset,
38                                                       void *model);
39
40 /* Access functions */
41 XBT_PUBLIC(double) tmgr_history_next_date(tmgr_fes_t history);
42 XBT_PUBLIC(tmgr_trace_iterator_t)
43     tmgr_history_get_next_event_leq(tmgr_fes_t history, double date,
44                                 double *value, void **model);
45
46 XBT_PUBLIC(void) tmgr_finalize(void);
47
48 SG_END_DECL()
49
50 #endif                          /* _SURF_TMGR_H */