]>
Commit | Line | Data |
---|---|---|
97d44b1f | 1 | /* |
b4806d6f PT |
2 | * (C) Copyright 2017 Theobroma Systems Design und Consulting GmbH |
3 | * (C) Copyright 2016 Alexander Graf <agraf@suse.de> | |
97d44b1f AG |
4 | * |
5 | * SPDX-License-Identifier: GPL-2.0+ | |
6 | */ | |
7 | ||
8 | #ifndef _SETJMP_H_ | |
9 | #define _SETJMP_H_ 1 | |
10 | ||
b4806d6f PT |
11 | /* |
12 | * This really should be opaque, but the EFI implementation wrongly | |
13 | * assumes that a 'struct jmp_buf_data' is defined. | |
14 | */ | |
97d44b1f | 15 | struct jmp_buf_data { |
b4806d6f PT |
16 | #if defined(__aarch64__) |
17 | u64 regs[13]; | |
97d44b1f | 18 | #else |
b4806d6f | 19 | u32 regs[10]; /* r4-r9, sl, fp, sp, lr */ |
97d44b1f | 20 | #endif |
b4806d6f | 21 | }; |
97d44b1f | 22 | |
b4806d6f | 23 | typedef struct jmp_buf_data jmp_buf[1]; |
97d44b1f | 24 | |
b4806d6f PT |
25 | int setjmp(jmp_buf jmp); |
26 | void longjmp(jmp_buf jmp, int ret); | |
97d44b1f AG |
27 | |
28 | #endif /* _SETJMP_H_ */ |