-/* Copyright (c) 2015. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2015. 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. */
-/** @file BoostContext.hpp
- Userspace context switching implementation based on Boost.Context */
-
#ifndef SIMGRID_SIMIX_BOOST_CONTEXT_HPP
#define SIMGRID_SIMIX_BOOST_CONTEXT_HPP
class BoostParallelContext;
class BoostContextFactory;
+/** @brief Userspace context switching implementation based on Boost.Context */
class BoostContext : public Context {
protected: // static
static bool parallel_;
BoostContext(std::function<void()> code,
void_pfn_smxprocess_t cleanup_func,
smx_process_t process);
- ~BoostContext();
- void resume();
+ ~BoostContext() override;
+ virtual void resume();
private:
static void wrapper(int first, ...);
};
friend BoostParallelContext;
BoostContextFactory();
- virtual ~BoostContextFactory();
- virtual Context* create_context(std::function<void()> code,
+ ~BoostContextFactory() override;
+ Context* create_context(std::function<void()> code,
void_pfn_smxprocess_t, smx_process_t process) override;
void run_all() override;
};