Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
snake_case simix::contextes
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 18 Jul 2018 20:47:08 +0000 (22:47 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 18 Jul 2018 20:47:08 +0000 (22:47 +0200)
src/kernel/context/ContextThread.cpp
src/kernel/context/ContextThread.hpp

index 7362e84..d18e04c 100644 (file)
@@ -115,11 +115,11 @@ void *ThreadContext::wrapper(void *param)
 
   try {
     (*context)();
-    if (not context->isMaestro()) // really?
+    if (not context->is_maestro()) // really?
       context->Context::stop();
   } catch (StopRequest const&) {
     XBT_DEBUG("Caught a StopRequest");
-    xbt_assert(not context->isMaestro(), "I'm not supposed to be maestro here.");
+    xbt_assert(not context->is_maestro(), "I'm not supposed to be maestro here.");
   }
 
   // Signal to the caller (normally the maestro) that we have finished:
@@ -171,13 +171,13 @@ void ThreadContext::attach_start()
   // We're breaking the layers here by depending on the upper layer:
   ThreadContext* maestro = (ThreadContext*)simix_global->maestro_process->context_;
   xbt_os_sem_release(maestro->begin_);
-  xbt_assert(not this->isMaestro());
+  xbt_assert(not this->is_maestro());
   this->start();
 }
 
 void ThreadContext::attach_stop()
 {
-  xbt_assert(not this->isMaestro());
+  xbt_assert(not this->is_maestro());
   this->yield();
 
   ThreadContext* maestro = (ThreadContext*)simix_global->maestro_process->context_;
@@ -223,13 +223,13 @@ void ParallelThreadContext::run_all()
 
 void ParallelThreadContext::start_hook()
 {
-  if (not isMaestro()) /* parallel run */
+  if (not is_maestro()) /* parallel run */
     xbt_os_sem_acquire(thread_sem_);
 }
 
 void ParallelThreadContext::yield_hook()
 {
-  if (not isMaestro()) /* parallel run */
+  if (not is_maestro()) /* parallel run */
     xbt_os_sem_release(thread_sem_);
 }
 
index 413afd6..819e07c 100644 (file)
@@ -25,7 +25,7 @@ public:
   void attach_start() override;
   void attach_stop() override;
 
-  bool isMaestro() const { return is_maestro_; }
+  bool is_maestro() const { return is_maestro_; }
   void release(); // unblock context's start()
   void wait();    // wait for context's yield()