preallocated.hpp 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Copyright Oliver Kowalke 2015.
  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_COROUTINES_DETAIL_PREALLOCATED_H
  6. #define BOOST_COROUTINES_DETAIL_PREALLOCATED_H
  7. #include <cstddef>
  8. #include <boost/config.hpp>
  9. #include <boost/coroutine/detail/config.hpp>
  10. #include <boost/coroutine/stack_context.hpp>
  11. #ifdef BOOST_HAS_ABI_HEADERS
  12. # include BOOST_ABI_PREFIX
  13. #endif
  14. namespace boost {
  15. namespace coroutines {
  16. namespace detail {
  17. struct BOOST_COROUTINES_DECL preallocated {
  18. void * sp;
  19. std::size_t size;
  20. stack_context sctx;
  21. preallocated() BOOST_NOEXCEPT :
  22. sp( 0), size( 0), sctx() {
  23. }
  24. preallocated( void * sp_, std::size_t size_, stack_context sctx_) BOOST_NOEXCEPT :
  25. sp( sp_), size( size_), sctx( sctx_) {
  26. }
  27. };
  28. }}}
  29. #ifdef BOOST_HAS_ABI_HEADERS
  30. # include BOOST_ABI_SUFFIX
  31. #endif
  32. #endif // BOOST_COROUTINES_DETAIL_PREALLOCATED_H