- xbt_assert1(!MSG_mailbox_get_cond(mailbox),
- "A process is already blocked on the channel %s",
- MSG_mailbox_get_alias(mailbox));
-
- cond = SIMIX_cond_init();
-
- /* set the condition of the mailbox */
- MSG_mailbox_set_cond(mailbox, cond);
+ if(!cond) {
+ cond = SIMIX_cond_init();
+ MSG_mailbox_set_cond(mailbox, cond);
+ }