blob: 28d04ea88a109a156d03e1ffcb71b0179ab5169d [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 Felkerad2fe252011-02-18 22:03:03 -050011#ifdef _GNU_SOURCE
12#define ucontext __ucontext
13#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