blob: ccd910fc164f0089335531b9fe57b9f915bb02a9 [file] [log] [blame]
Adam Barth57eacf52020-11-04 00:38:09 +00001#ifndef SYSROOT_UCONTEXT_H_
2#define SYSROOT_UCONTEXT_H_
Doug Horn1427b6a2018-12-11 13:19:16 -08003
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8#include <features.h>
Doug Horn1427b6a2018-12-11 13:19:16 -08009#include <signal.h>
10
11#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
12#define NGREG (sizeof(gregset_t) / sizeof(greg_t))
13#endif
14
15struct __ucontext;
16
17int getcontext(struct __ucontext*);
18void makecontext(struct __ucontext*, void (*)(void), int, ...);
19int setcontext(const struct __ucontext*);
20int swapcontext(struct __ucontext*, const struct __ucontext*);
21
22#ifdef __cplusplus
23}
24#endif
Adam Barth57eacf52020-11-04 00:38:09 +000025
26#endif // SYSROOT_UCONTEXT_H_