}
/********************************* Task **************************************/
-typedef struct simdata_task {
- ~simdata_task()
+struct s_simdata_task_t {
+ ~s_simdata_task_t()
{
/* parallel tasks only */
- xbt_free(this->host_list);
+ delete[] this->host_list;
+ /* flops_parallel_amount and bytes_parallel_amount are automatically deleted in ~L07Action */
}
void setUsed();
void setNotUsed() { this->isused = false; }
private:
void reportMultipleUse() const;
-} s_simdata_task_t;
+};
/******************************* Process *************************************/
}
/************************** Global variables ********************************/
-typedef struct MSG_Global {
+struct s_MSG_Global_t {
int debug_multiple_use; /* whether we want an error message when reusing the same Task for 2 things */
std::atomic_int_fast32_t sent_msg; /* Total amount of messages sent during the simulation */
void (*task_copy_callback)(msg_task_t task, msg_process_t src, msg_process_t dst);
void_f_pvoid_t process_data_cleanup;
-} s_MSG_Global_t;
+};
typedef s_MSG_Global_t* MSG_Global_t;
+XBT_PRIVATE std::string instr_process_id(msg_process_t proc);
+
extern "C" {
XBT_PUBLIC_DATA(MSG_Global_t) msg_global;
XBT_PRIVATE void TRACE_msg_task_put_end();
/* declaration of instrumentation functions from msg_process_instr.c */
-XBT_PRIVATE char* instr_process_id(msg_process_t proc, char* str, int len);
-XBT_PRIVATE char* instr_process_id_2(const char* process_name, int process_pid, char* str, int len);
XBT_PRIVATE void TRACE_msg_process_change_host(msg_process_t process, msg_host_t new_host);
XBT_PRIVATE void TRACE_msg_process_create(const char* process_name, int process_pid, msg_host_t host);
XBT_PRIVATE void TRACE_msg_process_destroy(const char* process_name, int process_pid);
XBT_PRIVATE void TRACE_msg_process_sleep_out(msg_process_t process);
}
-inline void simdata_task::setUsed()
+inline void s_simdata_task_t::setUsed()
{
if (this->isused)
this->reportMultipleUse();