]> AND Public Git Repository - simgrid.git/blobdiff - src/kernel/context/ContextBoost.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Move ForcefulKillException to the root namespace, along with the other exceptions
[simgrid.git] / src / kernel / context / ContextBoost.cpp
index 6153c41878d91a4b82438e1aa7fb30da0db6ebbe..4298641e5cce9c40970ee10864c29e9b5fe19ec8 100644 (file)
@@ -15,17 +15,15 @@ namespace kernel {
 namespace context {
 
 // BoostContextFactory
-smx_context_t BoostContextFactory::create_context(std::function<void()> code, void_pfn_smxprocess_t cleanup_func,
-                                                  smx_actor_t process)
+smx_context_t BoostContextFactory::create_context(std::function<void()> code, smx_actor_t actor)
 {
-  return this->new_context<BoostContext>(std::move(code), cleanup_func, process, this);
+  return this->new_context<BoostContext>(std::move(code), actor, this);
 }
 
 // BoostContext
 
-BoostContext::BoostContext(std::function<void()> code, void_pfn_smxprocess_t cleanup_func, smx_actor_t actor,
-                           SwappedContextFactory* factory)
-    : SwappedContext(std::move(code), cleanup_func, actor, factory)
+BoostContext::BoostContext(std::function<void()> code, smx_actor_t actor, SwappedContextFactory* factory)
+    : SwappedContext(std::move(code), actor, factory)
 {
 
   /* if the user provided a function for the process then use it, otherwise it is the context for maestro */
@@ -71,8 +69,8 @@ void BoostContext::wrapper(BoostContext::arg_type arg)
   try {
     (*context)();
     context->Context::stop();
-  } catch (StopRequest const&) {
-    XBT_DEBUG("Caught a StopRequest");
+  } catch (ForcefulKillException const&) {
+    XBT_DEBUG("Caught a ForcefulKillException");
   } catch (simgrid::Exception const& e) {
     XBT_INFO("Actor killed by an uncatched exception %s", simgrid::xbt::demangle(typeid(e).name()).get());
     throw;