fcontext_i386_win.hpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  8. # pragma once
  9. #endif
  10. #include <cstddef>
  11. #include <boost/config.hpp>
  12. #include <boost/cstdint.hpp>
  13. #include <boost/context/detail/config.hpp>
  14. #if defined(BOOST_MSVC)
  15. #pragma warning(push)
  16. #pragma warning(disable:4351)
  17. #endif
  18. #ifdef BOOST_HAS_ABI_HEADERS
  19. # include BOOST_ABI_PREFIX
  20. #endif
  21. namespace boost {
  22. namespace context {
  23. extern "C" {
  24. #define BOOST_CONTEXT_CALLDECL __cdecl
  25. struct stack_t
  26. {
  27. void * sp;
  28. std::size_t size;
  29. void * limit;
  30. stack_t() :
  31. sp( 0), size( 0), limit( 0)
  32. {}
  33. };
  34. struct fp_t
  35. {
  36. boost::uint32_t fc_freg[2];
  37. fp_t() :
  38. fc_freg()
  39. {}
  40. };
  41. struct fcontext_t
  42. {
  43. boost::uint32_t fc_greg[6];
  44. stack_t fc_stack;
  45. void * fc_excpt_lst;
  46. void * fc_local_storage;
  47. fp_t fc_fp;
  48. boost::uint32_t fc_dealloc;
  49. fcontext_t() :
  50. fc_greg(),
  51. fc_stack(),
  52. fc_excpt_lst( 0),
  53. fc_local_storage( 0),
  54. fc_fp(),
  55. fc_dealloc( 0)
  56. {}
  57. };
  58. }
  59. }}
  60. #ifdef BOOST_HAS_ABI_HEADERS
  61. # include BOOST_ABI_SUFFIX
  62. #endif
  63. #if defined(BOOST_MSVC)
  64. #pragma warning(pop)
  65. #endif
  66. #endif // BOOST_CONTEXT_DETAIL_FCONTEXT_I386_H