Context switch with setjmp and longjmp functions.