fcontext_i386.hpp 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. // Copyright Oliver Kowalke 2009.
  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_DETAIL_FCONTEXT_I386H
  6. #define BOOST_CONTEXT_DETAIL_FCONTEXT_I386H
  7. #include <cstddef>
  8. #include <boost/config.hpp>
  9. #include <boost/cstdint.hpp>
  10. #include <boost/context/detail/config.hpp>
  11. #ifdef BOOST_HAS_ABI_HEADERS
  12. # include BOOST_ABI_PREFIX
  13. #endif
  14. namespace boost {
  15. namespace context {
  16. extern "C" {
  17. #define BOOST_CONTEXT_CALLDECL __attribute__((cdecl))
  18. struct stack_t
  19. {
  20. void * sp;
  21. std::size_t size;
  22. stack_t() :
  23. sp( 0), size( 0)
  24. {}
  25. };
  26. struct fcontext_t
  27. {
  28. boost::uint32_t fc_greg[6];
  29. stack_t fc_stack;
  30. boost::uint32_t fc_freg[2];
  31. fcontext_t() :
  32. fc_greg(),
  33. fc_stack(),
  34. fc_freg()
  35. {}
  36. };
  37. }
  38. }}
  39. #ifdef BOOST_HAS_ABI_HEADERS
  40. # include BOOST_ABI_SUFFIX
  41. #endif
  42. #endif // BOOST_CONTEXT_DETAIL_FCONTEXT_I386_H