Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Partially snake_case ActorImpl
[simgrid.git] / src / kernel / context / ContextThread.cpp
index 8679b20..7362e84 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2017. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2009-2018. 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. */
@@ -10,7 +10,6 @@
 #include "src/simix/smx_private.hpp"
 #include "src/xbt_modinter.h" /* prototype of os thread module's init/exit in XBT */
 #include "xbt/function_types.h"
-#include "xbt/swag.h"
 #include "xbt/xbt_os_thread.h"
 
 #include "src/kernel/context/ContextThread.hpp"
@@ -170,7 +169,7 @@ void ThreadContext::suspend()
 void ThreadContext::attach_start()
 {
   // We're breaking the layers here by depending on the upper layer:
-  ThreadContext* maestro = (ThreadContext*) simix_global->maestro_process->context;
+  ThreadContext* maestro = (ThreadContext*)simix_global->maestro_process->context_;
   xbt_os_sem_release(maestro->begin_);
   xbt_assert(not this->isMaestro());
   this->start();
@@ -181,7 +180,7 @@ void ThreadContext::attach_stop()
   xbt_assert(not this->isMaestro());
   this->yield();
 
-  ThreadContext* maestro = (ThreadContext*) simix_global->maestro_process->context;
+  ThreadContext* maestro = (ThreadContext*)simix_global->maestro_process->context_;
   xbt_os_sem_acquire(maestro->end_);
 
   xbt_os_thread_set_extra_data(nullptr);
@@ -193,7 +192,7 @@ void SerialThreadContext::run_all()
 {
   for (smx_actor_t const& process : simix_global->process_to_run) {
     XBT_DEBUG("Handling %p", process);
-    ThreadContext* context = static_cast<ThreadContext*>(process->context);
+    ThreadContext* context = static_cast<ThreadContext*>(process->context_);
     context->release();
     context->wait();
   }
@@ -217,9 +216,9 @@ void ParallelThreadContext::finalize()
 void ParallelThreadContext::run_all()
 {
   for (smx_actor_t const& process : simix_global->process_to_run)
-    static_cast<ThreadContext*>(process->context)->release();
+    static_cast<ThreadContext*>(process->context_)->release();
   for (smx_actor_t const& process : simix_global->process_to_run)
-    static_cast<ThreadContext*>(process->context)->wait();
+    static_cast<ThreadContext*>(process->context_)->wait();
 }
 
 void ParallelThreadContext::start_hook()