musl/include/ucontext.h
Rich Felker ad2fe25041 support the ugly and deprecated ucontext and sigcontext header stuff...
only the structures, not the functions from ucontext.h, are supported
at this point. the main goal of this commit is to make modern gcc with
dwarf2 unwinding build without errors.

honestly, it probably doesn't matter how we define these as long as
they have members with the right names to prevent errors while
compiling libgcc. the only time they will be used is for propagating
exceptions across signal-handler boundaries, which invokes undefined
behavior anyway. but as-is, they're probably correct and may be useful
to various low-level applications dealing with virtualization, jit
code generation, and so on...
2011-02-18 22:03:03 -05:00

22 lines
370 B
C

#ifndef _UCONTEXT_H
#define _UCONTEXT_H
#ifdef __cplusplus
extern "C" {
#endif
#include <signal.h>
#ifdef _GNU_SOURCE
#define ucontext __ucontext
#endif
int getcontext(ucontext_t *);
void makecontext(ucontext_t *, void (*)(void), int, ...);
int setcontext(const ucontext_t *);
int swapcontext(ucontext_t *, const ucontext_t *);
#ifdef __cplusplus
}
#endif
#endif