preallocated.hpp 828 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright Oliver Kowalke 2014.
  2. // Distributed under the Boost Software License, Version 1.0.
  3. // (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. #ifndef BOOST_CONTEXT_PREALLOCATED_H
  6. #define BOOST_CONTEXT_PREALLOCATED_H
  7. #include <cstddef>
  8. #include <boost/config.hpp>
  9. #include <boost/context/detail/config.hpp>
  10. #ifdef BOOST_HAS_ABI_HEADERS
  11. # include BOOST_ABI_PREFIX
  12. #endif
  13. namespace boost {
  14. namespace context {
  15. struct preallocated {
  16. void * sp;
  17. std::size_t size;
  18. stack_context sctx;
  19. preallocated( void * sp_, std::size_t size_, stack_context sctx_) noexcept :
  20. sp( sp_), size( size_), sctx( sctx_) {
  21. }
  22. };
  23. }}
  24. #ifdef BOOST_HAS_ABI_HEADERS
  25. # include BOOST_ABI_SUFFIX
  26. #endif
  27. #endif // BOOST_CONTEXT_PREALLOCATED_H