setjmp.h 588 B

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