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_DATATYPES_H
8 #define _SIMIX_DATATYPES_H
16 /* ****************************** File *********************************** */
17 typedef struct s_smx_file *smx_file_t;
21 /* ******************************** Host ************************************ */
22 /** @defgroup m_datatypes_management_details Details on SIMIX datatypes */
23 /** @brief Host datatype
24 @ingroup m_datatypes_management
26 A <em>location</em> (or <em>host</em>) is any possible place where
27 a process may run. Thus it is represented as a <em>physical
28 resource with computing capabilities</em>, some <em>mailboxes</em>
29 to enable running process to communicate with remote ones, and
30 some <em>private data</em> that can be only accessed by local
33 \see m_host_management
35 typedef struct s_smx_host *smx_host_t;
43 SIMIX_SRC_HOST_FAILURE,
44 SIMIX_DST_HOST_FAILURE,
52 typedef struct s_smx_timer* smx_timer_t;
55 /* ******************************** Synchro ************************************ */
56 typedef struct s_smx_mutex *smx_mutex_t;
57 typedef struct s_smx_cond *smx_cond_t;
58 typedef struct s_smx_sem *smx_sem_t;
60 /********************************** Action *************************************/
61 typedef struct s_smx_action *smx_action_t; /* FIXME: replace by specialized action handlers */
65 /* ****************************** Process *********************************** */
66 /** @brief Agent datatype
67 @ingroup m_datatypes_management
69 An agent may be defined as a <em>code</em>, with some <em>private
70 data</em>, executing in a <em>location</em>.
71 \see m_process_management
73 typedef struct s_smx_process *smx_process_t;
78 * Type of function that creates a process.
79 * The function must accept the following parameters:
80 * void* process: the process created will be stored there
81 * const char *name: a name for the object. It is for user-level information and can be NULL
82 * xbt_main_func_t code: is a function describing the behavior of the agent
83 * void *data: data a pointer to any data one may want to attach to the new object.
84 * smx_host_t host: the location where the new agent is executed
85 * int argc, char **argv: parameters passed to code
86 * xbt_dict_t pros: properties
88 typedef void (*smx_creation_func_t) ( /* process */ smx_process_t*,
89 /* name */ const char*,
90 /* code */ xbt_main_func_t,
92 /* hostname */ const char*,
95 /* props */ xbt_dict_t);
98 /******************************* Networking ***********************************/
99 typedef struct s_smx_rvpoint *smx_rdv_t;