From 6ddf93bfbec1ecec76cf119c50327f93f6d4fef8 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sat, 9 Aug 2014 18:37:43 +0200 Subject: [PATCH] Add sys/ucontext.h * Move ucontext_t and mcontext_t there as that's where POSIX says they should be. --- headers/posix/signal.h | 10 ---------- headers/posix/sys/ucontext.h | 19 +++++++++++++++++++ headers/private/kernel/ksignal.h | 1 + headers/private/kernel/thread_types.h | 1 + 4 files changed, 21 insertions(+), 10 deletions(-) create mode 100644 headers/posix/sys/ucontext.h diff --git a/headers/posix/signal.h b/headers/posix/signal.h index d56cf2edfa..6b9da3d6c5 100644 --- a/headers/posix/signal.h +++ b/headers/posix/signal.h @@ -351,14 +351,4 @@ typedef struct vregs vregs; #include __HAIKU_ARCH_HEADER(signal.h) -typedef struct vregs mcontext_t; - -typedef struct __ucontext_t { - struct __ucontext_t* uc_link; - sigset_t uc_sigmask; - stack_t uc_stack; - mcontext_t uc_mcontext; -} ucontext_t; - - #endif /* _SIGNAL_H_ */ diff --git a/headers/posix/sys/ucontext.h b/headers/posix/sys/ucontext.h new file mode 100644 index 0000000000..52ae543f82 --- /dev/null +++ b/headers/posix/sys/ucontext.h @@ -0,0 +1,19 @@ +/* + * Copyright 2014, Haiku, Inc. All Rights Reserved. + * Distributed under the terms of the MIT License. + */ +#ifndef _UCONTEXT_H_ +#define _UCONTEXT_H_ + + +typedef struct vregs mcontext_t; + +typedef struct __ucontext_t { + struct __ucontext_t* uc_link; + sigset_t uc_sigmask; + stack_t uc_stack; + mcontext_t uc_mcontext; +} ucontext_t; + + +#endif diff --git a/headers/private/kernel/ksignal.h b/headers/private/kernel/ksignal.h index 4727053c8d..55d756df32 100644 --- a/headers/private/kernel/ksignal.h +++ b/headers/private/kernel/ksignal.h @@ -17,6 +17,7 @@ #include #include #include +#include namespace BKernel { diff --git a/headers/private/kernel/thread_types.h b/headers/private/kernel/thread_types.h index bfa1ad1004..ef2ba672c3 100644 --- a/headers/private/kernel/thread_types.h +++ b/headers/private/kernel/thread_types.h @@ -25,6 +25,7 @@ #include #include #include +#include enum additional_thread_state {