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 "xbt/file_stat.h"
11 #include "simgrid_config.h" // for HAVE_TRACING
15 /* ******************************** Host ************************************ */
17 typedef struct simdata_host *simdata_host_t;
19 typedef struct m_host {
20 char *name; /**< @brief host name if any */
21 simdata_host_t simdata; /**< @brief simulator data */
22 void *data; /**< @brief user data */
25 /** @brief Host datatype
26 @ingroup m_host_management
28 A <em>location</em> (or <em>host</em>) is any possible place where
29 a process may run. Thus it is represented as a <em>physical
30 resource with computing capabilities</em>, some <em>mailboxes</em>
31 to enable running process to communicate with remote ones, and
32 some <em>private data</em> that can be only accessed by local
35 typedef struct m_host *m_host_t;
37 /* ******************************** Task ************************************ */
39 typedef struct simdata_task *simdata_task_t;
41 typedef struct m_task {
42 char *name; /**< @brief task name if any */
43 simdata_task_t simdata; /**< @brief simulator data */
44 void *data; /**< @brief user data */
46 long long int counter; /* task unique identifier for instrumentation */
47 char *category; /* task category for instrumentation */
51 /** @brief Task datatype
52 @ingroup m_task_management
54 A <em>task</em> may then be defined by a <em>computing
55 amount</em>, a <em>message size</em> and some <em>private
58 typedef struct m_task *m_task_t;
61 /* ******************************** File ************************************ */
62 typedef struct simdata_file *simdata_file_t;
64 typedef struct msg_file {
65 char *name; /**< @brief file name */
66 simdata_file_t simdata; /**< @brief simulator data */
67 void *data; /**< @brief user data */
70 /** @brief File datatype.
71 @ingroup msg_file_management
73 You should consider this as an opaque object.
75 typedef struct msg_file *msg_file_t;
77 typedef s_file_stat_t s_msg_stat_t, *msg_stat_t;
80 /*************** Begin GPU ***************/
81 typedef struct simdata_gpu_task *simdata_gpu_task_t;
83 typedef struct m_gpu_task {
84 char *name; /**< @brief task name if any */
85 simdata_gpu_task_t simdata; /**< @brief simulator data */
87 long long int counter; /* task unique identifier for instrumentation */
88 char *category; /* task category for instrumentation */
92 /** @brief GPU task datatype
93 @ingroup m_task_management
95 A <em>task</em> may then be defined by a <em>computing
96 amount</em>, a <em>dispatch latency</em> and a <em>collect latency</em>.
97 \see m_task_management
99 typedef struct m_gpu_task *m_gpu_task_t;
100 /*************** End GPU ***************/
103 * \brief @brief Communication action.
104 * \ingroup msg_task_usage
106 * Object representing an ongoing communication between processes. Such beast is usually obtained by using #MSG_task_isend, #MSG_task_irecv or friends.
108 typedef struct msg_comm *msg_comm_t;
110 /** \brief Default value for an uninitialized #m_task_t.
111 \ingroup m_task_management
113 #define MSG_TASK_UNINITIALIZED NULL
115 /* ****************************** Process *********************************** */
117 /** @brief Process datatype.
118 @ingroup m_process_management
120 A process may be defined as a <em>code</em>, with some
121 <em>private data</em>, executing in a <em>location</em>.
123 You should not access directly to the fields of the pointed
124 structure, but always use the provided API to interact with
127 typedef struct s_smx_process *m_process_t;
129 #ifdef MSG_USE_DEPRECATED
130 typedef int m_channel_t;
133 /* ******************************** Mailbox ************************************ */
135 /** @brief Mailbox datatype
136 * @ingroup msg_task_usage
138 * Object representing a communication rendez-vous point, on which
139 * the sender finds the receiver it wants to communicate with. As a
140 * MSG user, you will only rarely manipulate any of these objects
141 * directly, since most of the public interface (such as
142 * #MSG_task_send and friends) hide this object behind a string
143 * alias. That mean that you don't provide the mailbox on which you
144 * want to send your task, but only the name of this mailbox. */
145 typedef struct s_smx_rvpoint *msg_mailbox_t;