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
[ChangeLog] Updated SMPI/Replay part.
[simgrid.git]
/
src
/
s4u
/
s4u_mailbox.cpp
diff --git
a/src/s4u/s4u_mailbox.cpp
b/src/s4u/s4u_mailbox.cpp
index 5a594bcbb77acd2be5474ec7e5349307898e9ac2..8d981638afd22427d0d82f66d14cdaf8642765ca 100644
(file)
--- a/
src/s4u/s4u_mailbox.cpp
+++ b/
src/s4u/s4u_mailbox.cpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2006-201
7
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2006-201
8
. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
@@
-16,9
+16,14
@@
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_channel,s4u,"S4U Communication Mailboxes");
namespace simgrid {
namespace s4u {
namespace simgrid {
namespace s4u {
-const
char* Mailbox::getName()
+const
simgrid::xbt::string& Mailbox::get_name() const
{
{
- return pimpl_->name_;
+ return pimpl_->get_name();
+}
+
+const char* Mailbox::get_cname() const
+{
+ return pimpl_->get_cname();
}
MailboxPtr Mailbox::byName(const char*name)
}
MailboxPtr Mailbox::byName(const char*name)
@@
-74,9
+79,9
@@
CommPtr Mailbox::put_init()
s4u::CommPtr Mailbox::put_init(void* data, uint64_t simulatedSize)
{
s4u::CommPtr res = put_init();
s4u::CommPtr Mailbox::put_init(void* data, uint64_t simulatedSize)
{
s4u::CommPtr res = put_init();
- res->set
Remains
(simulatedSize);
- res->src
Buff_
= data;
- res->src
BuffS
ize_ = sizeof(void*);
+ res->set
_remaining
(simulatedSize);
+ res->src
_buff_
= data;
+ res->src
_buff_s
ize_ = sizeof(void*);
return res;
}
s4u::CommPtr Mailbox::put_async(void* payload, uint64_t simulatedSize)
return res;
}
s4u::CommPtr Mailbox::put_async(void* payload, uint64_t simulatedSize)
@@
-92,8
+97,8
@@
void Mailbox::put(void* payload, uint64_t simulatedSize)
xbt_assert(payload != nullptr, "You cannot send nullptr");
CommPtr c = put_init();
xbt_assert(payload != nullptr, "You cannot send nullptr");
CommPtr c = put_init();
- c->set
Remains
(simulatedSize);
- c->set
SrcD
ata(payload);
+ c->set
_remaining
(simulatedSize);
+ c->set
_src_d
ata(payload);
c->wait();
}
/** Blocking send with timeout */
c->wait();
}
/** Blocking send with timeout */
@@
-102,8
+107,8
@@
void Mailbox::put(void* payload, uint64_t simulatedSize, double timeout)
xbt_assert(payload != nullptr, "You cannot send nullptr");
CommPtr c = put_init();
xbt_assert(payload != nullptr, "You cannot send nullptr");
CommPtr c = put_init();
- c->set
Remains
(simulatedSize);
- c->set
SrcD
ata(payload);
+ c->set
_remaining
(simulatedSize);
+ c->set
_src_d
ata(payload);
// c->start() is optional.
c->wait(timeout);
}
// c->start() is optional.
c->wait(timeout);
}
@@
-118,7
+123,7
@@
s4u::CommPtr Mailbox::get_init()
s4u::CommPtr Mailbox::get_async(void** data)
{
s4u::CommPtr res = get_init();
s4u::CommPtr Mailbox::get_async(void** data)
{
s4u::CommPtr res = get_init();
- res->set
DstD
ata(data, sizeof(*data));
+ res->set
_dst_d
ata(data, sizeof(*data));
res->start();
return res;
}
res->start();
return res;
}
@@
-127,7
+132,7
@@
void* Mailbox::get()
{
void* res = nullptr;
CommPtr c = get_init();
{
void* res = nullptr;
CommPtr c = get_init();
- c->set
DstD
ata(&res, sizeof(res));
+ c->set
_dst_d
ata(&res, sizeof(res));
c->wait();
return res;
}
c->wait();
return res;
}
@@
-135,7
+140,7
@@
void* Mailbox::get(double timeout)
{
void* res = nullptr;
CommPtr c = get_init();
{
void* res = nullptr;
CommPtr c = get_init();
- c->set
DstD
ata(&res, sizeof(res));
+ c->set
_dst_d
ata(&res, sizeof(res));
c->wait(timeout);
return res;
}
c->wait(timeout);
return res;
}