| 4 | |
| 5 | Examples seems working |
| 6 | {{{ |
| 7 | |
| 8 | leom-3:example leo$ c++ -arch i386 -arch x86_64 -I/opt/local/include exit.cpp -L/opt/local/lib -lboost_context-mt |
| 9 | leom-3:example leo$ arch -i386 ./a.out |
| 10 | size: 0x28 |
| 11 | main: call start_fcontext( & fcm, fc1, 0) |
| 12 | f1: entered |
| 13 | f1: call jump_fcontext( fc1, fc2, 0) |
| 14 | f2: entered |
| 15 | f2: call jump_fcontext( fc2, fc1, 0) |
| 16 | f1: return |
| 17 | leom-3:example leo$ arch -x86_64 ./a.out |
| 18 | size: 0x58 |
| 19 | main: call start_fcontext( & fcm, fc1, 0) |
| 20 | f1: entered |
| 21 | f1: call jump_fcontext( fc1, fc2, 0) |
| 22 | f2: entered |
| 23 | f2: call jump_fcontext( fc2, fc1, 0) |
| 24 | f1: return |
| 25 | leom-3:example leo$ c++ -arch i386 -arch x86_64 -I/opt/local/include jump.cpp -L/opt/local/lib -lboost_context-mt |
| 26 | leom-3:example leo$ arch -i386 ./a.out |
| 27 | main: call start_fcontext( & fcm, fc1, 0) |
| 28 | f1: entered |
| 29 | f1: call jump_fcontext( fc1, fc2, 0) |
| 30 | f2: entered |
| 31 | f2: call jump_fcontext( fc2, fc1, 0) |
| 32 | f1: return |
| 33 | main: done |
| 34 | leom-3:example leo$ arch -x86_64 ./a.out |
| 35 | main: call start_fcontext( & fcm, fc1, 0) |
| 36 | f1: entered |
| 37 | f1: call jump_fcontext( fc1, fc2, 0) |
| 38 | f2: entered |
| 39 | f2: call jump_fcontext( fc2, fc1, 0) |
| 40 | f1: return |
| 41 | main: done |
| 42 | }}} |