Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'pikachuyann/simgrid-xbt_random'
[simgrid.git] / src / kernel / resource / profile / Event.hpp
1 /* Copyright (c) 2004-2020. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #ifndef SIMGRID_KERNEL_PROFILE_EVENT_HPP
7 #define SIMGRID_KERNEL_PROFILE_EVENT_HPP
8
9 #include "simgrid/forward.h"
10
11 namespace simgrid {
12 namespace kernel {
13 namespace profile {
14
15 class Event {
16 public:
17   Profile* profile;
18   unsigned int idx;
19   resource::Resource* resource;
20   bool free_me;
21 };
22 } // namespace profile
23 } // namespace kernel
24 } // namespace simgrid
25 /**
26  * @brief Free a trace event structure
27  *
28  * This function frees a trace_event if it can be freed, ie, if it has the free_me flag set to 1.
29  * This flag indicates whether the structure is still used somewhere or not.
30  * When the structure is freed, the argument is set to nullptr
31  */
32 XBT_PUBLIC void tmgr_trace_event_unref(simgrid::kernel::profile::Event** trace_event);
33
34 #endif // SIMGRID_KERNEL_PROFILE_EVENT_HPP