lkml.org 
[lkml]   [2017]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 60/89] signals: Split out <linux/signal_types.h> from <linux/signal.h>
    Date
    Separate out just the pure data types - sched.h will be able to use
    this reduced size header.

    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Mike Galbraith <efault@gmx.de>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    ---
    arch/mips/include/asm/abi.h | 2 ++
    include/linux/signal.h | 57 +------------------------------------------------------
    include/linux/signal_types.h | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    3 files changed, 69 insertions(+), 56 deletions(-)

    diff --git a/arch/mips/include/asm/abi.h b/arch/mips/include/asm/abi.h
    index 940760844e2f..dba7f4b6bebf 100644
    --- a/arch/mips/include/asm/abi.h
    +++ b/arch/mips/include/asm/abi.h
    @@ -9,6 +9,8 @@
    #ifndef _ASM_ABI_H
    #define _ASM_ABI_H

    +#include <linux/signal_types.h>
    +
    #include <asm/signal.h>
    #include <asm/siginfo.h>
    #include <asm/vdso.h>
    diff --git a/include/linux/signal.h b/include/linux/signal.h
    index 5308304993be..94ad6eea9550 100644
    --- a/include/linux/signal.h
    +++ b/include/linux/signal.h
    @@ -1,32 +1,13 @@
    #ifndef _LINUX_SIGNAL_H
    #define _LINUX_SIGNAL_H

    -#include <linux/list.h>
    #include <linux/bug.h>
    -#include <uapi/linux/signal.h>
    +#include <linux/signal_types.h>

    struct task_struct;

    /* for sysctl */
    extern int print_fatal_signals;
    -/*
    - * Real Time signals may be queued.
    - */
    -
    -struct sigqueue {
    - struct list_head list;
    - int flags;
    - siginfo_t info;
    - struct user_struct *user;
    -};
    -
    -/* flags values. */
    -#define SIGQUEUE_PREALLOC 1
    -
    -struct sigpending {
    - struct list_head list;
    - sigset_t signal;
    -};

    #ifndef HAVE_ARCH_COPY_SIGINFO

    @@ -272,42 +253,6 @@ extern void set_current_blocked(sigset_t *);
    extern void __set_current_blocked(const sigset_t *);
    extern int show_unhandled_signals;

    -struct sigaction {
    -#ifndef __ARCH_HAS_IRIX_SIGACTION
    - __sighandler_t sa_handler;
    - unsigned long sa_flags;
    -#else
    - unsigned int sa_flags;
    - __sighandler_t sa_handler;
    -#endif
    -#ifdef __ARCH_HAS_SA_RESTORER
    - __sigrestore_t sa_restorer;
    -#endif
    - sigset_t sa_mask; /* mask last for extensibility */
    -};
    -
    -struct k_sigaction {
    - struct sigaction sa;
    -#ifdef __ARCH_HAS_KA_RESTORER
    - __sigrestore_t ka_restorer;
    -#endif
    -};
    -
    -#ifdef CONFIG_OLD_SIGACTION
    -struct old_sigaction {
    - __sighandler_t sa_handler;
    - old_sigset_t sa_mask;
    - unsigned long sa_flags;
    - __sigrestore_t sa_restorer;
    -};
    -#endif
    -
    -struct ksignal {
    - struct k_sigaction ka;
    - siginfo_t info;
    - int sig;
    -};
    -
    extern int get_signal(struct ksignal *ksig);
    extern void signal_setup_done(int failed, struct ksignal *ksig, int stepping);
    extern void exit_signals(struct task_struct *tsk);
    diff --git a/include/linux/signal_types.h b/include/linux/signal_types.h
    new file mode 100644
    index 000000000000..16d862a3d8f3
    --- /dev/null
    +++ b/include/linux/signal_types.h
    @@ -0,0 +1,66 @@
    +#ifndef _LINUX_SIGNAL_TYPES_H
    +#define _LINUX_SIGNAL_TYPES_H
    +
    +/*
    + * Basic signal handling related data type definitions:
    + */
    +
    +#include <linux/list.h>
    +#include <uapi/linux/signal.h>
    +
    +/*
    + * Real Time signals may be queued.
    + */
    +
    +struct sigqueue {
    + struct list_head list;
    + int flags;
    + siginfo_t info;
    + struct user_struct *user;
    +};
    +
    +/* flags values. */
    +#define SIGQUEUE_PREALLOC 1
    +
    +struct sigpending {
    + struct list_head list;
    + sigset_t signal;
    +};
    +
    +struct sigaction {
    +#ifndef __ARCH_HAS_IRIX_SIGACTION
    + __sighandler_t sa_handler;
    + unsigned long sa_flags;
    +#else
    + unsigned int sa_flags;
    + __sighandler_t sa_handler;
    +#endif
    +#ifdef __ARCH_HAS_SA_RESTORER
    + __sigrestore_t sa_restorer;
    +#endif
    + sigset_t sa_mask; /* mask last for extensibility */
    +};
    +
    +struct k_sigaction {
    + struct sigaction sa;
    +#ifdef __ARCH_HAS_KA_RESTORER
    + __sigrestore_t ka_restorer;
    +#endif
    +};
    +
    +#ifdef CONFIG_OLD_SIGACTION
    +struct old_sigaction {
    + __sighandler_t sa_handler;
    + old_sigset_t sa_mask;
    + unsigned long sa_flags;
    + __sigrestore_t sa_restorer;
    +};
    +#endif
    +
    +struct ksignal {
    + struct k_sigaction ka;
    + siginfo_t info;
    + int sig;
    +};
    +
    +#endif /* _LINUX_SIGNAL_TYPES_H */
    --
    2.7.4
    \
     
     \ /
      Last update: 2017-02-06 14:39    [W:2.229 / U:0.104 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site