diff options
author | kib <kib@FreeBSD.org> | 2016-02-12 07:38:19 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2016-02-12 07:38:19 +0000 |
commit | a05a278552bfbdc67dd026be8a748c627b57d0c4 (patch) | |
tree | 783f901008bac7a377fe9c52843c1f80c9e84512 /sys/sys/ucontext.h | |
parent | 7af72453b7efe688c01e9d79607f455c01914ba7 (diff) | |
download | FreeBSD-src-a05a278552bfbdc67dd026be8a748c627b57d0c4.zip FreeBSD-src-a05a278552bfbdc67dd026be8a748c627b57d0c4.tar.gz |
POSIX states that #include <signal.h> shall make both mcontext_t and
ucontext_t available. Our code even has XXX comment about this.
Add a bit of compliance by moving struct __ucontext definition into
sys/_ucontext.h and including it into signal.h and sys/ucontext.h.
Several machine/ucontext.h headers were changed to use namespace-safe
types (like uint64_t->__uint64_t) to not depend on sys/types.h.
struct __stack_t from sys/signal.h is made always visible in private
namespace to satisfy sys/_ucontext.h requirements.
Apparently mips _types.h pollutes global namespace with f_register_t
type definition. This commit does not try to fix the issue.
PR: 207079
Reported and tested by: Ting-Wei Lan <lantw44@gmail.com>
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Diffstat (limited to 'sys/sys/ucontext.h')
-rw-r--r-- | sys/sys/ucontext.h | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/sys/sys/ucontext.h b/sys/sys/ucontext.h index e80ed50..260c157 100644 --- a/sys/sys/ucontext.h +++ b/sys/sys/ucontext.h @@ -33,25 +33,9 @@ #include <sys/signal.h> #include <machine/ucontext.h> +#include <sys/_ucontext.h> -typedef struct __ucontext { - /* - * Keep the order of the first two fields. Also, - * keep them the first two fields in the structure. - * This way we can have a union with struct - * sigcontext and ucontext_t. This allows us to - * support them both at the same time. - * note: the union is not defined, though. - */ - sigset_t uc_sigmask; - mcontext_t uc_mcontext; - - struct __ucontext *uc_link; - stack_t uc_stack; - int uc_flags; #define UCF_SWAPPED 0x00000001 /* Used by swapcontext(3). */ - int __spare__[4]; -} ucontext_t; #if defined(_KERNEL) && defined(COMPAT_FREEBSD4) #if defined(__i386__) |