コード例 #1
0
ファイル: test_context.cpp プロジェクト: manctl/boost
void fn3( std::string const& str)
{
    X x( str);
    intptr_t vp = gctx.suspend( value1);
    value1 = vp;
	BOOST_ASSERT( gctx.is_running() );
    gctx.suspend();
}
コード例 #2
0
ファイル: unwind.cpp プロジェクト: elrasguno/libten
void fn()
{
    X x;

    for( int i = 0;; ++i)
    {
        std::cout << "fn(): " << i << std::endl;
        ctx.suspend();
    }
}
コード例 #3
0
void fn2() {
    std::cout << "inside function fn2(): fn2() returns return to fn()" << std::endl;
 //   ctx.resume();
    ctx2.suspend();
    std::cout << "finish fn2(), returning back to fn\n";
}
コード例 #4
0
ファイル: link.cpp プロジェクト: elrasguno/libten
void fn2()
{
    std::cout << "first time inside fn2()" << std::endl;
    ctx2.suspend();
    std::cout << "second time inside fn2(), returns to main()" << std::endl;
}