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
Move ASan related instructions around context swapping into SwappedContext.
[simgrid.git]
/
src
/
kernel
/
activity
/
MutexImpl.cpp
diff --git
a/src/kernel/activity/MutexImpl.cpp
b/src/kernel/activity/MutexImpl.cpp
index
25a0c77
..
8505e91
100644
(file)
--- a/
src/kernel/activity/MutexImpl.cpp
+++ b/
src/kernel/activity/MutexImpl.cpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2007-20
19
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-20
20
. 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. */
@@
-30,7
+30,7
@@
void MutexImpl::lock(actor::ActorImpl* issuer)
/* mutex free */
locked_ = true;
owner_ = issuer;
/* mutex free */
locked_ = true;
owner_ = issuer;
-
SIMIX_simcall_answer(&issuer->simcall
);
+
issuer->simcall_answer(
);
}
XBT_OUT();
}
}
XBT_OUT();
}
@@
-68,12
+68,11
@@
void MutexImpl::unlock(actor::ActorImpl* issuer)
owner_->get_cname(), owner_->get_pid());
if (not sleeping_.empty()) {
owner_->get_cname(), owner_->get_pid());
if (not sleeping_.empty()) {
- /*
process to wake up
*/
-
actor::ActorImpl* p
= &sleeping_.front();
+ /*
Give the ownership to the first waiting actor
*/
+
owner_
= &sleeping_.front();
sleeping_.pop_front();
sleeping_.pop_front();
- p->waiting_synchro = nullptr;
- owner_ = p;
- SIMIX_simcall_answer(&p->simcall);
+ owner_->waiting_synchro = nullptr;
+ owner_->simcall_answer();
} else {
/* nobody to wake up */
locked_ = false;
} else {
/* nobody to wake up */
locked_ = false;
@@
-102,15
+101,15
@@
void MutexImpl::unref()
void simcall_HANDLER_mutex_lock(smx_simcall_t simcall, smx_mutex_t mutex)
{
void simcall_HANDLER_mutex_lock(smx_simcall_t simcall, smx_mutex_t mutex)
{
- mutex->lock(simcall->issuer);
+ mutex->lock(simcall->issuer
_
);
}
int simcall_HANDLER_mutex_trylock(smx_simcall_t simcall, smx_mutex_t mutex)
{
}
int simcall_HANDLER_mutex_trylock(smx_simcall_t simcall, smx_mutex_t mutex)
{
- return mutex->try_lock(simcall->issuer);
+ return mutex->try_lock(simcall->issuer
_
);
}
void simcall_HANDLER_mutex_unlock(smx_simcall_t simcall, smx_mutex_t mutex)
{
}
void simcall_HANDLER_mutex_unlock(smx_simcall_t simcall, smx_mutex_t mutex)
{
- mutex->unlock(simcall->issuer);
+ mutex->unlock(simcall->issuer
_
);
}
}