1 /* Copyright (c) 2004, 2005, 2007, 2008, 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. */
10 #include "simgrid_config.h" // for HAVE_TRACING
14 /* ******************************** Host ************************************ */
16 /** @defgroup m_datatypes_management_details Details on MSG datatypes
17 @ingroup m_datatypes_management*/
18 typedef struct simdata_host *simdata_host_t;
20 /** @brief Host datatype
21 @ingroup m_datatypes_management_details */
22 typedef struct m_host {
23 char *name; /**< @brief host name if any */
24 simdata_host_t simdata; /**< @brief simulator data */
25 void *data; /**< @brief user data */
28 /** @brief Host datatype
29 @ingroup m_datatypes_management
31 A <em>location</em> (or <em>host</em>) is any possible place where
32 a process may run. Thus it is represented as a <em>physical
33 resource with computing capabilities</em>, some <em>mailboxes</em>
34 to enable running process to communicate with remote ones, and
35 some <em>private data</em> that can be only accessed by local
38 \see m_host_management
40 typedef struct m_host *m_host_t;
43 /* ******************************** Task ************************************ */
45 typedef struct simdata_task *simdata_task_t;
47 /** @brief Task datatype
48 @ingroup m_datatypes_management_details */
49 typedef struct m_task {
50 char *name; /**< @brief task name if any */
51 simdata_task_t simdata; /**< @brief simulator data */
52 void *data; /**< @brief user data */
54 long long int counter; /* task unique identifier for instrumentation */
55 char *category; /* task category for instrumentation */
59 /** @brief Task datatype
60 @ingroup m_datatypes_management
62 A <em>task</em> may then be defined by a <em>computing
63 amount</em>, a <em>message size</em> and some <em>private
65 \see m_task_management
67 typedef struct m_task *m_task_t;
70 /*************** Begin GPU ***************/
71 typedef struct simdata_gpu_task *simdata_gpu_task_t;
73 /** @brief GPU task datatype
74 @ingroup m_datatypes_management_details */
75 typedef struct m_gpu_task {
76 char *name; /**< @brief task name if any */
77 simdata_gpu_task_t simdata; /**< @brief simulator data */
79 long long int counter; /* task unique identifier for instrumentation */
80 char *category; /* task category for instrumentation */
84 /** @brief GPU task datatype
85 @ingroup m_datatypes_management
87 A <em>task</em> may then be defined by a <em>computing
88 amount</em>, a <em>dispatch latency</em> and a <em>collect latency</em>.
89 \see m_task_management
91 typedef struct m_gpu_task *m_gpu_task_t;
92 /*************** End GPU ***************/
95 * \brief @brief Communication action
96 * \ingroup m_datatypes_management
98 * Communication actions transfer tasks between processes.
99 * For a given task, the sender and the receiver have distinct objects.
101 typedef struct msg_comm *msg_comm_t;
103 /** \brief Default value for an uninitialized #m_task_t.
104 \ingroup m_datatypes_management
106 #define MSG_TASK_UNINITIALIZED NULL
110 /* ****************************** Process *********************************** */
112 /** @brief Process datatype
113 @ingroup m_datatypes_management
115 A process may be defined as a <em>code</em>, with some <em>private
116 data</em>, executing in a <em>location</em>.
117 \see m_process_management
119 typedef struct s_smx_process *m_process_t;
122 #ifdef MSG_USE_DEPRECATED
123 /* ********************************* Channel ******************************** */
124 /** @brief Channel datatype
125 @ingroup msg_deprecated_functions
127 A <em>channel</em> is a number and identifies a mailbox type (just as a
129 \see m_channel_management
131 typedef int m_channel_t;
135 /* ******************************** Mailbox ************************************ */
137 typedef struct s_smx_rvpoint *msg_mailbox_t;
138 /** @brief Mailbox datatype
139 @ingroup m_datatypes_management_details @{ */
141 void MSG_mailbox_free(void *mailbox);
147 /* ***************************** Error handling ***************************** */
148 /** @brief Error handling
149 @ingroup m_datatypes_management
151 *//* Keep these code as binary values: java bindings manipulate | of these values */
153 MSG_OK = 0, /**< @brief Everything is right. Keep on going this way ! */
154 MSG_TIMEOUT = 1, /**< @brief nothing good happened before the timer you provided elapsed */
155 MSG_TRANSFER_FAILURE = 2, /**< @brief There has been a problem during you task
156 transfer. Either the network is down or the remote host has been
158 MSG_HOST_FAILURE = 4, /**< @brief System shutdown. The host on which you are
159 running has just been rebooted. Free your datastructures and
161 MSG_TASK_CANCELED = 8 /**< @brief Canceled task. This task has been canceled by somebody!*/