@whitequark longjmp2 allocates a new branch on the forked stack and jumps there, copying the current stack frame as it may get modifed later. Use regular setjmp and longjmp to jump back to the adjacent stack frame on the sibbling branch. This allows for green threads. Returning from the callee calls the continuation point passed to longjmp2.