blob: 5164ef1879447664c9b992cabe74be885f1c7bc0 [file] [log] [blame]
Viet-Trung Luu96b05c12016-01-11 11:26:36 -08001#ifndef _UCONTEXT_H
2#define _UCONTEXT_H
3#ifdef __cplusplus
4extern "C" {
5#endif
6
7#include <features.h>
8
9#include <signal.h>
10
11#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
George Kulakowski17e3b042016-02-18 15:59:50 -080012#define NGREG (sizeof(gregset_t) / sizeof(greg_t))
Viet-Trung Luu96b05c12016-01-11 11:26:36 -080013#endif
14
15struct __ucontext;
16
George Kulakowski17e3b042016-02-18 15:59:50 -080017int getcontext(struct __ucontext*);
18void makecontext(struct __ucontext*, void (*)(void), int, ...);
19int setcontext(const struct __ucontext*);
20int swapcontext(struct __ucontext*, const struct __ucontext*);
Viet-Trung Luu96b05c12016-01-11 11:26:36 -080021
22#ifdef __cplusplus
23}
24#endif
25#endif