Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Some build adjustments mandatory for the relocation of xbt_contexts [Cristian]
[simgrid.git] / src / include / simix / datatypes.h
1 /*      $Id$     */
2
3 /* Copyright (c) 2007 Arnaud Legrand, Bruno Donnassolo.
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 SIMIX_DATATYPE_H
10 #define SIMIX_DATATYPE_H
11 #include "xbt/misc.h"
12 #include "xbt/swag.h"
13 #include "xbt/fifo.h"
14
15 SG_BEGIN_DECL()
16
17 /* ******************************** Host ************************************ */
18 /** @defgroup m_datatypes_management_details Details on SIMIX datatypes */
19 /** @brief Host datatype  
20     @ingroup m_datatypes_management
21
22     A <em>location</em> (or <em>host</em>) is any possible place where
23     a process may run. Thus it is represented as a <em>physical
24     resource with computing capabilities</em>, some <em>mailboxes</em>
25     to enable running process to communicate with remote ones, and
26     some <em>private data</em> that can be only accessed by local
27     process.
28
29     \see m_host_management
30   @{ */
31      typedef struct s_smx_host *smx_host_t;
32 /** @} */
33
34
35 /* ******************************** Syncro ************************************ */
36
37      typedef struct s_smx_mutex *smx_mutex_t;
38      typedef struct s_smx_cond *smx_cond_t;
39
40
41 /********************************** Action *************************************/
42      typedef struct s_smx_simdata_action *smx_simdata_action_t;
43 /** @brief Action datatype 
44     @ingroup m_datatypes_management_details */
45      typedef struct s_smx_action {
46        char *name;              /**< @brief action name if any */
47        smx_simdata_action_t simdata;
48                                 /**< @brief simulator data */
49        xbt_fifo_t cond_list;    /*< conditional variables that must be signaled when the action finish. */
50        void *data;              /**< @brief user data */
51        int refcount;            /**< @brief reference counter */
52      } s_smx_action_t;
53
54      typedef struct s_smx_action *smx_action_t;
55
56
57 /* ****************************** Process *********************************** */
58 /** @brief Agent datatype  
59     @ingroup m_datatypes_management 
60
61     An agent may be defined as a <em>code</em>, with some <em>private
62     data</em>, executing in a <em>location</em>.
63     \see m_process_management
64   @{ */
65      typedef struct s_smx_process *smx_process_t;
66 /** @} */
67
68 SG_END_DECL()
69 #endif