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
add test() for asynchronous executions
[simgrid.git]
/
src
/
simix
/
smx_synchro_private.hpp
diff --git
a/src/simix/smx_synchro_private.hpp
b/src/simix/smx_synchro_private.hpp
index
5846b04
..
7123a0f
100644
(file)
--- a/
src/simix/smx_synchro_private.hpp
+++ b/
src/simix/smx_synchro_private.hpp
@@
-7,11
+7,16
@@
#define SIMIX_SYNCHRO_PRIVATE_H
#include "simgrid/s4u/ConditionVariable.hpp"
#define SIMIX_SYNCHRO_PRIVATE_H
#include "simgrid/s4u/ConditionVariable.hpp"
-#include "xbt/swag.h"
+#include "src/simix/ActorImpl.hpp"
+#include <boost/intrusive/list.hpp>
namespace simgrid {
namespace simix {
namespace simgrid {
namespace simix {
+typedef boost::intrusive::list<ActorImpl, boost::intrusive::member_hook<ActorImpl, boost::intrusive::list_member_hook<>,
+ &ActorImpl::smx_synchro_hook>>
+ SynchroList;
+
class XBT_PUBLIC() MutexImpl {
public:
MutexImpl();
class XBT_PUBLIC() MutexImpl {
public:
MutexImpl();
@@
-26,7
+31,7
@@
public:
bool locked = false;
smx_actor_t owner = nullptr;
// List of sleeping processes:
bool locked = false;
smx_actor_t owner = nullptr;
// List of sleeping processes:
-
xbt_swag_t sleeping = nullptr
;
+
simgrid::simix::SynchroList sleeping
;
// boost::intrusive_ptr<Mutex> support:
friend void intrusive_ptr_add_ref(MutexImpl* mutex)
// boost::intrusive_ptr<Mutex> support:
friend void intrusive_ptr_add_ref(MutexImpl* mutex)
@@
-54,13
+59,13
@@
struct s_smx_cond_t {
std::atomic_int_fast32_t refcount_{1};
smx_mutex_t mutex = nullptr;
std::atomic_int_fast32_t refcount_{1};
smx_mutex_t mutex = nullptr;
-
xbt_swag_t sleeping = nullptr; /* list of sleeping proces
s */
+
simgrid::simix::SynchroList sleeping; /* list of sleeping processe
s */
simgrid::s4u::ConditionVariable cond_;
};
struct s_smx_sem_t {
unsigned int value;
simgrid::s4u::ConditionVariable cond_;
};
struct s_smx_sem_t {
unsigned int value;
-
xbt_swag_t sleeping; /* list of sleeping proces
s */
+
simgrid::simix::SynchroList sleeping; /* list of sleeping processe
s */
};
XBT_PRIVATE void SIMIX_post_synchro(smx_activity_t synchro);
};
XBT_PRIVATE void SIMIX_post_synchro(smx_activity_t synchro);