aarch64: add static asserts for struct layout
parent
09f78ddc28
commit
5546fde1e5
|
@ -24,6 +24,10 @@
|
||||||
|
|
||||||
extern void libucontext_trampoline(void);
|
extern void libucontext_trampoline(void);
|
||||||
|
|
||||||
|
_Static_assert(offsetof(libucontext_ucontext_t, uc_mcontext.regs[0]) == R0_OFFSET, "R0_OFFSET is invalid");
|
||||||
|
_Static_assert(offsetof(libucontext_ucontext_t, uc_mcontext.sp) == SP_OFFSET, "SP_OFFSET is invalid");
|
||||||
|
_Static_assert(offsetof(libucontext_ucontext_t, uc_mcontext.pc) == PC_OFFSET, "PC_OFFSET is invalid");
|
||||||
|
_Static_assert(offsetof(libucontext_ucontext_t, uc_mcontext.pstate) == PSTATE_OFFSET, "PSTATE_OFFSET is invalid");
|
||||||
|
|
||||||
void
|
void
|
||||||
libucontext_makecontext(libucontext_ucontext_t *ucp, void (*func)(void), int argc, ...)
|
libucontext_makecontext(libucontext_ucontext_t *ucp, void (*func)(void), int argc, ...)
|
||||||
|
|
Loading…
Reference in New Issue