From 20328e6bff8321a39eca17dccb1bc8958c9804a2 Mon Sep 17 00:00:00 2001 From: Frederic Suter Date: Fri, 20 Jul 2018 21:58:42 +0200 Subject: [PATCH] boolification --- src/simix/ActorImpl.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/simix/ActorImpl.cpp b/src/simix/ActorImpl.cpp index f6665e769d..2970aa7b08 100644 --- a/src/simix/ActorImpl.cpp +++ b/src/simix/ActorImpl.cpp @@ -111,7 +111,7 @@ void SIMIX_process_cleanup(smx_actor_t process) #endif simix_global->process_to_destroy.push_back(*process); } - process->context_->iwannadie = 0; + process->context_->iwannadie = false; simix_global->mutex.unlock(); } @@ -192,7 +192,7 @@ smx_activity_t ActorImpl::suspend(ActorImpl* issuer) return nullptr; } - suspended_ = 1; + suspended_ = true; /* If we are suspending another actor that is waiting on a sync, suspend its synchronization. */ if (this != issuer) { @@ -217,7 +217,7 @@ void ActorImpl::resume() if (not suspended_) return; - suspended_ = 0; + suspended_ = false; /* resume the synchronization that was blocking the resumed actor. */ if (waiting_synchro) @@ -443,9 +443,9 @@ void SIMIX_process_kill(smx_actor_t process, smx_actor_t issuer) { (issuer->host_ == nullptr ? "(null)" : issuer->host_->get_cname()), process->get_cname(), process->host_->get_cname()); - process->context_->iwannadie = 1; - process->blocked_ = 0; - process->suspended_ = 0; + process->context_->iwannadie = true; + process->blocked_ = false; + process->suspended_ = false; process->exception = nullptr; /* destroy the blocking synchro if any */ @@ -709,7 +709,7 @@ void SIMIX_process_yield(smx_actor_t self) if (self->suspended_) { XBT_DEBUG("Hey! I'm suspended."); xbt_assert(self->exception != nullptr, "Gasp! This exception may be lost by subsequent calls."); - self->suspended_ = 0; + self->suspended_ = false; self->suspend(self); } -- 2.20.1