common: define libucontext_ucontext_t for non-freestanding case

pull/21/head
Ariadne Conill 2020-12-06 03:18:41 -06:00
parent 11468c3e54
commit 2979186379
1 changed files with 15 additions and 0 deletions

View File

@ -46,4 +46,19 @@ __proc: \
#define REG_OFFSET(__reg) (MCONTEXT_GREGS + ((__reg) * REG_SZ)) #define REG_OFFSET(__reg) (MCONTEXT_GREGS + ((__reg) * REG_SZ))
#ifndef LIBUCONTEXT_ASSEMBLY
#ifndef FREESTANDING
typedef ucontext_t libucontext_ucontext_t;
#endif
int libucontext_getcontext(libucontext_ucontext_t *);
void libucontext_makecontext(libucontext_ucontext_t *, void (*)(), int, ...);
int libucontext_setcontext(const libucontext_ucontext_t *);
int libucontext_swapcontext(libucontext_ucontext_t *, const libucontext_ucontext_t *);
#endif
#endif #endif