1 /* Copyright (c) 2007, 2009, 2010. The SimGrid Team.
2 * All rights reserved. */
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. */
7 #ifndef SIMIX_DATATYPE_H
8 #define SIMIX_DATATYPE_H
15 /* ******************************** Host ************************************ */
16 /** @defgroup m_datatypes_management_details Details on SIMIX datatypes */
17 /** @brief Host datatype
18 @ingroup m_datatypes_management
20 A <em>location</em> (or <em>host</em>) is any possible place where
21 a process may run. Thus it is represented as a <em>physical
22 resource with computing capabilities</em>, some <em>mailboxes</em>
23 to enable running process to communicate with remote ones, and
24 some <em>private data</em> that can be only accessed by local
27 \see m_host_management
29 typedef struct s_smx_host *smx_host_t;
33 /* ******************************** Syncro ************************************ */
34 typedef struct s_smx_mutex {
35 xbt_swag_t sleeping; /* list of sleeping process */
38 typedef s_smx_mutex_t *smx_mutex_t;
40 typedef struct s_smx_cond {
41 xbt_swag_t sleeping; /* list of sleeping process */
43 xbt_fifo_t actions; /* list of actions */
45 typedef s_smx_cond_t *smx_cond_t;
47 typedef struct s_smx_sem {
48 xbt_fifo_t sleeping; /* list of sleeping process */
50 xbt_fifo_t actions; /* list of actions */
52 typedef s_smx_sem_t *smx_sem_t;
54 /********************************** Action *************************************/
55 typedef struct s_smx_action *smx_action_t;
57 /* ****************************** Process *********************************** */
58 /** @brief Agent datatype
59 @ingroup m_datatypes_management
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
65 typedef struct s_smx_process *smx_process_t;
68 typedef struct s_smx_context *smx_context_t;
70 /******************************* Networking ***********************************/
71 typedef struct s_smx_rvpoint *smx_rdv_t;
72 typedef struct s_smx_comm *smx_comm_t;
73 typedef enum { comm_send,