summaryrefslogtreecommitdiff
path: root/libs/context/src/fcontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/context/src/fcontext.cpp')
-rw-r--r--libs/context/src/fcontext.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/libs/context/src/fcontext.cpp b/libs/context/src/fcontext.cpp
new file mode 100644
index 0000000000..596cbd8e8a
--- /dev/null
+++ b/libs/context/src/fcontext.cpp
@@ -0,0 +1,36 @@
+
+// Copyright Oliver Kowalke 2009.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#define BOOST_CONTEXT_SOURCE
+
+#include <boost/context/fcontext.hpp>
+
+#include <cstddef>
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost {
+namespace ctx {
+namespace detail {
+
+extern "C" BOOST_CONTEXT_DECL
+void * BOOST_CONTEXT_CALLDECL align_stack( void * vp)
+{
+ void * base = vp;
+ if ( 0 != ( ( ( uintptr_t) base) & 15) )
+ base = ( char * ) ( ( ( ( uintptr_t) base) - 15) & ~0x0F);
+ return base;
+}
+
+}
+
+}}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif