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
and now, a correct implementation of this_actor::isMaestro()
[simgrid.git]
/
src
/
s4u
/
s4u_actor.cpp
diff --git
a/src/s4u/s4u_actor.cpp
b/src/s4u/s4u_actor.cpp
index
7b6e968
..
ab6f3a1
100644
(file)
--- a/
src/s4u/s4u_actor.cpp
+++ b/
src/s4u/s4u_actor.cpp
@@
-11,6
+11,8
@@
#include "simgrid/s4u/Mailbox.hpp"
#include "src/kernel/context/Context.hpp"
#include "simgrid/s4u/Mailbox.hpp"
#include "src/kernel/context/Context.hpp"
+#include "src/simix/smx_private.h"
+
#include <sstream>
XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_actor, "S4U actors");
#include <sstream>
XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_actor, "S4U actors");
@@
-179,8
+181,8
@@
namespace this_actor {
*/
bool isMaestro()
{
*/
bool isMaestro()
{
- smx_
context_t self_context = SIMIX_context
_self();
- return
self_context == nullptr
;
+ smx_
actor_t process = SIMIX_process
_self();
+ return
process == nullptr || process == simix_global->maestro_process
;
}
void sleep_for(double duration)
}
void sleep_for(double duration)