Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
63e3eb8f3518a5576b374aae732269958a502d71
[simgrid.git] / include / simgrid / actor.h
1 /* Public interface to the Link datatype                                    */
2
3 /* Copyright (c) 2018. The SimGrid Team. All rights reserved.          */
4
5 /* This program is free software; you can redistribute it and/or modify it
6  * under the terms of the license (GNU LGPL) which comes with this package. */
7
8 #ifndef INCLUDE_SIMGRID_ACTOR_H_
9 #define INCLUDE_SIMGRID_ACTOR_H_
10
11 #include <simgrid/forward.h>
12 #include <xbt/base.h>
13 #include <xbt/dict.h>
14
15 /* C interface */
16 SG_BEGIN_DECL()
17 /** @brief Actor datatype.
18     @ingroup m_actor_management
19
20     An actor may be defined as a <em>code</em>, with some <em>private data</em>, executing in a <em>location</em>.
21
22     You should not access directly to the fields of the pointed structure, but always use the provided API to interact
23     with actors.
24  */
25
26 XBT_PUBLIC int sg_actor_get_PID(sg_actor_t actor);
27 XBT_PUBLIC int sg_actor_get_PPID(sg_actor_t actor);
28 XBT_PUBLIC const char* sg_actor_get_name(sg_actor_t actor);
29 XBT_PUBLIC sg_host_t sg_actor_get_host(sg_actor_t actor);
30 XBT_PUBLIC const char* sg_actor_get_property_value(sg_actor_t actor, const char* name);
31 XBT_PUBLIC xbt_dict_t sg_actor_get_properties(sg_actor_t actor);
32 XBT_PUBLIC void sg_actor_suspend(sg_actor_t actor);
33 XBT_PUBLIC void sg_actor_resume(sg_actor_t actor);
34 XBT_PUBLIC int sg_actor_is_suspended(sg_actor_t actor);
35 XBT_PUBLIC sg_actor_t sg_actor_restart(sg_actor_t actor);
36 XBT_PUBLIC void sg_actor_daemonize(sg_actor_t actor);
37
38 SG_END_DECL()
39
40 #endif /* INCLUDE_SIMGRID_ACTOR_H_ */