diff options
| author | Michael Brown | 2024-09-12 15:17:20 +0200 |
|---|---|---|
| committer | Michael Brown | 2024-09-12 16:01:04 +0200 |
| commit | 5de5d4626e192f5d0e6c97e14ce03b92a43622b3 (patch) | |
| tree | 3947d6e1f9b5c877140006f248147f2e503e8e41 /src/arch/arm32/include/bits | |
| parent | [cloud] Add ability to delete old AMI images (diff) | |
| download | ipxe-5de5d4626e192f5d0e6c97e14ce03b92a43622b3.tar.gz ipxe-5de5d4626e192f5d0e6c97e14ce03b92a43622b3.tar.xz ipxe-5de5d4626e192f5d0e6c97e14ce03b92a43622b3.zip | |
[libc] Centralise architecture-independent portions of setjmp.h
The definitions of the setjmp() and longjmp() functions are common to
all architectures, with only the definition of the jump buffer
structure being architecture-specific.
Move the architecture-specific portions to bits/setjmp.h and provide a
common setjmp.h for the function definitions.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/arch/arm32/include/bits')
| -rw-r--r-- | src/arch/arm32/include/bits/setjmp.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/arch/arm32/include/bits/setjmp.h b/src/arch/arm32/include/bits/setjmp.h new file mode 100644 index 000000000..9ee264ecd --- /dev/null +++ b/src/arch/arm32/include/bits/setjmp.h @@ -0,0 +1,32 @@ +#ifndef _BITS_SETJMP_H +#define _BITS_SETJMP_H + +FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); + +#include <stdint.h> + +/** A jump buffer */ +typedef struct { + /** Saved r4 */ + uint32_t r4; + /** Saved r5 */ + uint32_t r5; + /** Saved r6 */ + uint32_t r6; + /** Saved r7 */ + uint32_t r7; + /** Saved r8 */ + uint32_t r8; + /** Saved r9 */ + uint32_t r9; + /** Saved r10 */ + uint32_t r10; + /** Saved frame pointer (r11) */ + uint32_t fp; + /** Saved stack pointer (r13) */ + uint32_t sp; + /** Saved link register (r14) */ + uint32_t lr; +} jmp_buf[1]; + +#endif /* _BITS_SETJMP_H */ |
