setjmp.h 588 B

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