From 12b6dde63e04eb66465c08c5b4a3fefb25463c69 Mon Sep 17 00:00:00 2001 From: Charalampos Mainas Date: Wed, 4 Sep 2019 12:25:37 +0200 Subject: [PATCH] ucontext.h: Import from musl Copied as is from the official musl git mirror git://git.musl-libc.org/musl, commit 6fcb440d. Signed-off-by: Charalampos Mainas Reviewed-by: Costin Lupu --- musl-imported/include/ucontext.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 musl-imported/include/ucontext.h diff --git a/musl-imported/include/ucontext.h b/musl-imported/include/ucontext.h new file mode 100644 index 0000000..3bb776e --- /dev/null +++ b/musl-imported/include/ucontext.h @@ -0,0 +1,25 @@ +#ifndef _UCONTEXT_H +#define _UCONTEXT_H +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#include + +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +#define NGREG (sizeof(gregset_t)/sizeof(greg_t)) +#endif + +struct __ucontext; + +int getcontext(struct __ucontext *); +void makecontext(struct __ucontext *, void (*)(void), int, ...); +int setcontext(const struct __ucontext *); +int swapcontext(struct __ucontext *, const struct __ucontext *); + +#ifdef __cplusplus +} +#endif +#endif -- 2.39.5