X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/347996b4a10c4e8579080692afa60e0afb88b60a..17af4a7b4d8635b9e330e1a9bffa367d6c8f8564:/src/simix/BoostContext.cpp diff --git a/src/simix/BoostContext.cpp b/src/simix/BoostContext.cpp index 3b4e63f94b..8af10115c1 100644 --- a/src/simix/BoostContext.cpp +++ b/src/simix/BoostContext.cpp @@ -55,7 +55,7 @@ public: bool BoostContext::parallel_ = false; xbt_parmap_t BoostContext::parmap_ = nullptr; -unsigned long BoostContext::threads_working_ = 0; +uintptr_t BoostContext::threads_working_ = 0; xbt_os_thread_key_t BoostContext::worker_id_key_; unsigned long BoostContext::process_index_ = 0; BoostContext* BoostContext::maestro_context_ = nullptr; @@ -245,8 +245,8 @@ void BoostParallelContext::suspend() } else { XBT_DEBUG("No more processes to run"); - unsigned long worker_id = - (unsigned long) xbt_os_thread_get_specific(worker_id_key_); + uintptr_t worker_id = + (uintptr_t) xbt_os_thread_get_specific(worker_id_key_); next_context = static_cast( workers_context_[worker_id]); } @@ -269,7 +269,7 @@ void BoostParallelContext::stop() void BoostParallelContext::resume() { - unsigned long worker_id = __sync_fetch_and_add(&threads_working_, 1); + uintptr_t worker_id = __sync_fetch_and_add(&threads_working_, 1); xbt_os_thread_set_specific(worker_id_key_, (void*) worker_id); BoostParallelContext* worker_context = @@ -290,6 +290,7 @@ void BoostParallelContext::resume() XBT_PRIVATE ContextFactory* boost_factory() { + XBT_VERB("Using Boost contexts. Welcome to the 21th century."); return new BoostContextFactory(); }