2
0

ucontext.h 495 B

12345678910111213141516171819202122232425
  1. #ifndef _UCONTEXT_H
  2. #define _UCONTEXT_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <features.h>
  7. #include <signal.h>
  8. #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
  9. #define NGREG (sizeof(gregset_t)/sizeof(greg_t))
  10. #endif
  11. struct __ucontext;
  12. int getcontext(struct __ucontext *);
  13. void makecontext(struct __ucontext *, void (*)(), int, ...);
  14. int setcontext(const struct __ucontext *);
  15. int swapcontext(struct __ucontext *, const struct __ucontext *);
  16. #ifdef __cplusplus
  17. }
  18. #endif
  19. #endif