Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright headers.
[simgrid.git] / src / kernel / context / ContextRaw.hpp
index f2c9bc6..2126f38 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. */
@@ -6,6 +6,7 @@
 #ifndef SIMGRID_SIMIX_RAW_CONTEXT_HPP
 #define SIMGRID_SIMIX_RAW_CONTEXT_HPP
 
+#include <atomic>
 #include <cstdint>
 #include <functional>
 #include <vector>
@@ -79,7 +80,7 @@ public:
 private:
   static simgrid::xbt::Parmap<smx_actor_t>* parmap_;
   static std::vector<ParallelRawContext*> workers_context_;
-  static uintptr_t threads_working_;
+  static std::atomic<uintptr_t> threads_working_;
   static xbt_os_thread_key_t worker_id_key_;
 };
 #endif