A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Export some mailbox related functions
[simgrid.git]
/
src
/
msg
/
msg_mailbox.c
diff --git
a/src/msg/msg_mailbox.c
b/src/msg/msg_mailbox.c
index
8b29ed1
..
160503e
100644
(file)
--- a/
src/msg/msg_mailbox.c
+++ b/
src/msg/msg_mailbox.c
@@
-20,30
+20,25
@@
MSG_mailbox_mod_exit(void)
}
\r
\r
msg_mailbox_t
\r
}
\r
\r
msg_mailbox_t
\r
-MSG_mailbox_
new
(const char *alias)
\r
+MSG_mailbox_
create
(const char *alias)
\r
{
\r
msg_mailbox_t mailbox = xbt_new0(s_msg_mailbox_t,1);
\r
\r
mailbox->tasks = xbt_fifo_new();
\r
mailbox->cond = NULL;
\r
{
\r
msg_mailbox_t mailbox = xbt_new0(s_msg_mailbox_t,1);
\r
\r
mailbox->tasks = xbt_fifo_new();
\r
mailbox->cond = NULL;
\r
-
mailbox->alias = xbt_strdup(alias)
;
\r
+
mailbox->alias = alias ? xbt_strdup(alias) : NULL
;
\r
mailbox->hostname = NULL;
\r
\r
mailbox->hostname = NULL;
\r
\r
- /* add the mbox in the dictionary */
\r
- xbt_dict_set(msg_mailboxes, alias, mailbox, MSG_mailbox_free);
\r
-
\r
return mailbox;
\r
}
\r
\r
msg_mailbox_t
\r
return mailbox;
\r
}
\r
\r
msg_mailbox_t
\r
-MSG_mailbox_
create
(const char *alias)
\r
+MSG_mailbox_
new
(const char *alias)
\r
{
\r
{
\r
- msg_mailbox_t mailbox =
xbt_new0(s_msg_mailbox_t,1
);
\r
+ msg_mailbox_t mailbox =
MSG_mailbox_create(alias
);
\r
\r
\r
- mailbox->tasks = xbt_fifo_new();
\r
- mailbox->cond = NULL;
\r
- mailbox->alias = xbt_strdup(alias);
\r
- mailbox->hostname = NULL;
\r
+ /* add the mbox in the dictionary */
\r
+ xbt_dict_set(msg_mailboxes, alias, mailbox, MSG_mailbox_free);
\r
\r
return mailbox;
\r
}
\r
\r
return mailbox;
\r
}
\r