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
Remove dead code after exception throw.
[simgrid.git]
/
src
/
kernel
/
activity
/
SemaphoreImpl.cpp
diff --git
a/src/kernel/activity/SemaphoreImpl.cpp
b/src/kernel/activity/SemaphoreImpl.cpp
index
29e9265
..
86d1e9e
100644
(file)
--- a/
src/kernel/activity/SemaphoreImpl.cpp
+++ b/
src/kernel/activity/SemaphoreImpl.cpp
@@
-4,7
+4,7
@@
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "src/kernel/activity/SemaphoreImpl.hpp"
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "src/kernel/activity/SemaphoreImpl.hpp"
-#include "src/
simix/smx_synchro_private
.hpp"
+#include "src/
kernel/activity/SynchroRaw
.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_semaphore, simix_synchro, "Semaphore kernel-space implementation");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_semaphore, simix_synchro, "Semaphore kernel-space implementation");
@@
-14,11
+14,11
@@
namespace activity {
void SemaphoreImpl::acquire(smx_actor_t issuer, double timeout)
{
void SemaphoreImpl::acquire(smx_actor_t issuer, double timeout)
{
-
smx_activity_t
synchro = nullptr;
+
RawImplPtr
synchro = nullptr;
XBT_DEBUG("Wait semaphore %p (timeout:%f)", this, timeout);
if (value_ <= 0) {
XBT_DEBUG("Wait semaphore %p (timeout:%f)", this, timeout);
if (value_ <= 0) {
- synchro =
SIMIX_synchro_wait(issuer->host_
, timeout);
+ synchro =
RawImplPtr(new RawImpl())->start(issuer->get_host()
, timeout);
synchro->simcalls_.push_front(&issuer->simcall);
issuer->waiting_synchro = synchro;
sleeping_.push_back(*issuer);
synchro->simcalls_.push_front(&issuer->simcall);
issuer->waiting_synchro = synchro;
sleeping_.push_back(*issuer);