mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
sparc
This commit is contained in:
parent
17558fbe2d
commit
26eba9db1a
1 changed files with 24 additions and 0 deletions
24
src/libthread/sparc-ucontext.h
Normal file
24
src/libthread/sparc-ucontext.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
#define setcontext(u) _setmcontext(&(u)->mc)
|
||||
#define getcontext(u) _getmcontext(&(u)->mc)
|
||||
typedef struct mcontext mcontext_t;
|
||||
typedef struct ucontext ucontext_t;
|
||||
struct mcontext
|
||||
{
|
||||
int r[16];
|
||||
};
|
||||
|
||||
struct ucontext
|
||||
{
|
||||
struct {
|
||||
void *ss_sp;
|
||||
uint ss_size;
|
||||
} uc_stack;
|
||||
sigset_t uc_sigmask;
|
||||
mcontext_t mc;
|
||||
};
|
||||
|
||||
void makecontext(ucontext_t*, void(*)(void), int, ...);
|
||||
int swapcontext(ucontext_t*, ucontext_t*);
|
||||
int _getmcontext(mcontext_t*);
|
||||
void _setmcontext(mcontext_t*);
|
||||
|
Loading…
Reference in a new issue