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 /* ******************************** Host ************************************ */
17 /** @defgroup m_datatypes_management_details Details on SIMIX datatypes */
18 /** @brief Host datatype
19 @ingroup m_datatypes_management
21 A <em>location</em> (or <em>host</em>) is any possible place where
22 a process may run. Thus it is represented as a <em>physical
23 resource with computing capabilities</em>, some <em>mailboxes</em>
24 to enable running process to communicate with remote ones, and
25 some <em>private data</em> that can be only accessed by local
28 \see m_host_management
30 typedef struct s_smx_host *smx_host_t;
38 SIMIX_SRC_HOST_FAILURE,
39 SIMIX_DST_HOST_FAILURE,
47 typedef struct s_smx_timer* smx_timer_t;
50 /* ******************************** Synchro ************************************ */
51 typedef struct s_smx_mutex *smx_mutex_t;
52 typedef struct s_smx_cond *smx_cond_t;
53 typedef struct s_smx_sem *smx_sem_t;
55 /********************************** Action *************************************/
56 typedef struct s_smx_action *smx_action_t; /* FIXME: replace by specialized action handlers */
60 /* ****************************** Process *********************************** */
61 /** @brief Agent datatype
62 @ingroup m_datatypes_management
64 An agent may be defined as a <em>code</em>, with some <em>private
65 data</em>, executing in a <em>location</em>.
66 \see m_process_management
68 typedef struct s_smx_process *smx_process_t;
72 /* User create and kill process, the function must accept the folling parameters:
73 * const char *name: a name for the object. It is for user-level information and can be NULL
74 * xbt_main_func_t code: is a function describing the behavior of the agent
75 * void *data: data a pointer to any data one may want to attach to the new object.
76 * smx_host_t host: the location where the new agent is executed
77 * int argc, char **argv: parameters passed to code
80 typedef void *(*smx_creation_func_t) ( /*name */ const char *,
81 /*code */ xbt_main_func_t,
86 /* props */ xbt_dict_t);
89 /******************************* Networking ***********************************/
90 typedef struct s_smx_rvpoint *smx_rdv_t;