libcopp
2.2.0
src
libcopp
fcontext
asm
tail_ppc32_sysv_elf_gas.cpp
Go to the documentation of this file.
1
2
// Copyright Oliver Kowalke 2009.
3
// Distributed under the Boost Software License, Version 1.0.
4
// (See accompanying file LICENSE_1_0.txt or copy at
5
// http://www.boost.org/LICENSE_1_0.txt)
6
7
#include <
libcopp/fcontext/fcontext.hpp
>
8
9
using
copp::fcontext_t
;
10
using
copp::transfer_t;
11
12
// This C++ tail of ontop_fcontext() allocates transfer_t{ from, vp }
13
// on the stack. If fn() throws a C++ exception, then the C++ runtime
14
// must remove this tail's stack frame.
15
extern
"C"
transfer_t
16
ontop_fcontext_tail
(
int
ignore,
void
* vp, transfer_t (* fn)(transfer_t),
fcontext_t
const
from) {
17
return
fn( transfer_t{ from, vp });
18
}
fcontext.hpp
fcontext::fcontext_t
void * fcontext_t
Definition:
fcontext.hpp:27
ontop_fcontext_tail
transfer_t ontop_fcontext_tail(int ignore, void *vp, transfer_t(*fn)(transfer_t), fcontext_t const from)
Definition:
tail_ppc32_sysv_elf_gas.cpp:16
Generated by
1.9.1