- m_host_t host = MSG_host_self();
- container_t host_container = getContainer(host->name);
- container_t msg = newContainer(task->name, INSTR_MSG_TASK, host_container);
- type_t type = getType (task->category);
- pajeSetVariable(SIMIX_get_clock(), type->id, msg->id, "1");
+ m_host_t host = MSG_host_self();
+ container_t host_container = getContainer(host->name);
+ container_t msg = newContainer(task->name, INSTR_MSG_TASK, host_container);
+ type_t type = getType (task->category, msg->type);
+ new_pajeSetVariable (SIMIX_get_clock(), msg, type, 1);
+
+ type = getType ("MSG_TASK_STATE", msg->type);
+ val_t value = getValueByName ("created", type);
+ new_pajePushState (MSG_get_clock(), msg, type, value);
+
+ type = getType ("MSG_TASK_LINK", getRootType());
+ char key[INSTR_DEFAULT_STR_SIZE];
+ snprintf (key, INSTR_DEFAULT_STR_SIZE, "%lld", task->counter);
+ new_pajeEndLink (MSG_get_clock(), getRootContainer(), type, msg, "SR", key);
+ }