sglua_copy_value(src, dst);
/* src: ... task
dst: ... task */
- sglua_task_register(dst); /* dst: ... */
+ sglua_task_register(dst);
+ /* dst: ... */
/* the receiver is now the owner of the task and may destroy it:
* make the sender forget the C task so that it doesn't garbage */
#include "mc/mc.h"
#include "xbt/log.h"
#include "xbt/sysdep.h"
+#include "simix/private.h" // FIXME
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_gos, msg,
"Logging specific to MSG (gos)");
*/
void MSG_comm_destroy(msg_comm_t comm)
{
- if (comm->task_received != NULL
- && *comm->task_received != NULL
- && MSG_comm_get_status(comm) == MSG_OK) {
- (*comm->task_received)->simdata->isused = 0;
- }
-
xbt_free(comm);
}
/* the communication is finished */
comm->status = status;
+ if (comm->task_received != NULL) {
+ /* I am the receiver */
+ (*comm->task_received)->simdata->isused = 0;
+ }
+
return finished_index;
}