mirror of
git://git.musl-libc.org/musl
synced 2024-12-20 22:01:16 +00:00
ad2fe25041
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...
22 lines
370 B
C
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
|