diff options
author | mini <mini@FreeBSD.org> | 2002-09-16 19:28:01 +0000 |
---|---|---|
committer | mini <mini@FreeBSD.org> | 2002-09-16 19:28:01 +0000 |
commit | 30a54cd01f46234158839d9a6cf458649587d7e6 (patch) | |
tree | cc10e1243ba2d04a18c1c1d27702a8b1d595ee08 /sys/sys/ucontext.h | |
parent | 94ac5d965f6dd6ceff971a557f94ebb21964eb16 (diff) | |
download | FreeBSD-src-30a54cd01f46234158839d9a6cf458649587d7e6.zip FreeBSD-src-30a54cd01f46234158839d9a6cf458649587d7e6.tar.gz |
Add kernel support needed for the KSE-aware libpthread:
- Use ucontext_t's to store KSE thread state.
- Synthesize state for the UTS upon each upcall, rather than
saving and copying a trapframe.
- Save and restore FPU state properly in ucontext_t's.
- Deliver signals to KSE-aware processes via upcall.
- Rename kse mailbox structure fields to be more BSD-like.
- Store the UTS's stack in struct proc in a stack_t.
Reviewed by: bde, deischen, julian
Approved by: -arch
Diffstat (limited to 'sys/sys/ucontext.h')
-rw-r--r-- | sys/sys/ucontext.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/sys/ucontext.h b/sys/sys/ucontext.h index 424e06f..194b63a 100644 --- a/sys/sys/ucontext.h +++ b/sys/sys/ucontext.h @@ -31,6 +31,7 @@ #ifndef _SYS_UCONTEXT_H_ #define _SYS_UCONTEXT_H_ +#include <sys/signal.h> #include <machine/ucontext.h> typedef struct __ucontext { @@ -47,7 +48,9 @@ typedef struct __ucontext { struct __ucontext *uc_link; stack_t uc_stack; - int __spare__[8]; + int uc_flags; +#define UCF_SWAPPED 0x00000001 /* Used by swapcontext(3). */ + int __spare__[4]; } ucontext_t; #ifndef _KERNEL @@ -57,6 +60,7 @@ __BEGIN_DECLS int getcontext(ucontext_t *); int setcontext(const ucontext_t *); void makecontext(ucontext_t *, void (*)(void), int, ...); +int signalcontext(ucontext_t *, int, __sighandler_t *); int swapcontext(ucontext_t *, const ucontext_t *); __END_DECLS |