|
ginnOS
The reference: libc, the libraries and the kernel
|
non-local jumps. More...
Go to the source code of this file.
Macros | |
| #define | _setjmp(env) |
| #define | _longjmp(env, value) |
Typedefs | |
| typedef unsigned long | jmp_buf[8] |
Functions | |
| int | setjmp (jmp_buf env) __attribute__((returns_twice)) |
| save the calling context. | |
| void | longjmp (jmp_buf env, int value) __attribute__((noreturn)) |
| go back to where setjmp saved env; setjmp then returns value (1 if value is 0). | |
non-local jumps.
a jmp_buf keeps the registers a function call must keep (i686: ebx, esi, edi, ebp; x86_64: rbx, rbp, r12 to r15), the stack pointer and the return address.
| #define _setjmp | ( | env | ) |
| #define _longjmp | ( | env, | |
| value ) |
| typedef unsigned long jmp_buf[8] |
| int setjmp | ( | jmp_buf | env | ) |
save the calling context.
| void longjmp | ( | jmp_buf | env, |
| int | value ) |
go back to where setjmp saved env; setjmp then returns value (1 if value is 0).