setjmp.h 833 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * This file is part of the UCB release of Plan 9. It is subject to the license
  3. * terms in the LICENSE file found in the top-level directory of this
  4. * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No
  5. * part of the UCB release of Plan 9, including this file, may be copied,
  6. * modified, propagated, or distributed except according to the terms contained
  7. * in the LICENSE file.
  8. */
  9. #ifndef __SETJMP_H
  10. #define __SETJMP_H
  11. #pragma lib "/$M/lib/ape/libap.a"
  12. typedef int jmp_buf[10];
  13. #ifdef _POSIX_SOURCE
  14. typedef int sigjmp_buf[10];
  15. #endif
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. extern int setjmp(jmp_buf);
  20. extern void longjmp(jmp_buf, int);
  21. #ifdef _POSIX_SOURCE
  22. extern int sigsetjmp(sigjmp_buf, int);
  23. extern void siglongjmp(sigjmp_buf, int);
  24. #endif
  25. #ifdef __cplusplus
  26. }
  27. #endif
  28. #endif /* __SETJMP_H */