blob: 3bb776ed6a86969a530a558ff81506cfc7ccbb4b [file] [log] [blame]
Rich Felker0b44a032011-02-12 00:22:29 -05001#ifndef _UCONTEXT_H
2#define _UCONTEXT_H
3#ifdef __cplusplus
4extern "C" {
5#endif
6
Rich Felkerc1a96582012-09-07 23:13:55 -04007#include <features.h>
8
Rich Felker0b44a032011-02-12 00:22:29 -05009#include <signal.h>
10
Rich Felkera8da6c22012-11-25 23:04:23 -050011#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
12#define NGREG (sizeof(gregset_t)/sizeof(greg_t))
Rich Felkerad2fe252011-02-18 22:03:03 -050013#endif
Rich Felker0b44a032011-02-12 00:22:29 -050014
Rich Felker47e72e12011-06-29 17:13:01 -040015struct __ucontext;
16
17int getcontext(struct __ucontext *);
18void makecontext(struct __ucontext *, void (*)(void), int, ...);
Rich Felkeracfd06d2011-07-31 00:10:29 -040019int setcontext(const struct __ucontext *);
Rich Felker47e72e12011-06-29 17:13:01 -040020int swapcontext(struct __ucontext *, const struct __ucontext *);
Rich Felker0b44a032011-02-12 00:22:29 -050021
22#ifdef __cplusplus
23}
24#endif
25#endif