diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2017-06-10 21:26:24 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2017-06-10 21:26:24 +0200 |
commit | d6d1bdfefafff50b7b6d15d218c0a188570be541 (patch) | |
tree | 15ee8de727d0be5d126efda146b2879de0a72773 /src/libc/setjmp.h | |
parent | eea5bf4b859eb56c5772c58ca54937a90a10e7ee (diff) | |
download | abaos-d6d1bdfefafff50b7b6d15d218c0a188570be541.tar.gz abaos-d6d1bdfefafff50b7b6d15d218c0a188570be541.tar.bz2 |
some big renames into subdirs of aspects
updated README
removed size_t in sys/types.h and sys/types.h itself, size_t is in stddef.h
Diffstat (limited to 'src/libc/setjmp.h')
-rw-r--r-- | src/libc/setjmp.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/libc/setjmp.h b/src/libc/setjmp.h new file mode 100644 index 0000000..5f987f1 --- /dev/null +++ b/src/libc/setjmp.h @@ -0,0 +1,24 @@ +#ifndef SETJMP_H +#define SETJMP_H + +#include <stdint.h> + +// C99 states this should be an array so we can address it without +// the & operator, see prototypes of setjmp and longjmp +// eax, ecx and edx are scratch registers, save the others +// also store the jump address (eip) +typedef struct { + uint32_t ebx; + uint32_t esp; + uint32_t ebp; + uint32_t esi; + uint32_t edi; + uint32_t eip; +} jmp_buf[1]; + +int setjmp( jmp_buf env ); + +void longjmp( jmp_buf env, int val ); + +#endif // SETJMP_H + |