diff options
author | Andreas Kling <kling@serenityos.org> | 2021-08-14 17:05:53 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-14 19:58:11 +0200 |
commit | 6fd721247660f8323de35f7fa337362395930f19 (patch) | |
tree | 186e44265d2791de0653d0dc898f4b946ad6f805 /Userland/Libraries/LibC/signal.h | |
parent | 9dc135017783c96bbca6fb31b2e0d3339b845813 (diff) | |
download | serenity-6fd721247660f8323de35f7fa337362395930f19.zip |
Kernel+LibC: Share definitions for signal.h
Diffstat (limited to 'Userland/Libraries/LibC/signal.h')
-rw-r--r-- | Userland/Libraries/LibC/signal.h | 57 |
1 files changed, 1 insertions, 56 deletions
diff --git a/Userland/Libraries/LibC/signal.h b/Userland/Libraries/LibC/signal.h index 69ba740aca..6184ba0f67 100644 --- a/Userland/Libraries/LibC/signal.h +++ b/Userland/Libraries/LibC/signal.h @@ -6,41 +6,12 @@ #pragma once +#include <Kernel/API/POSIX/signal.h> #include <signal_numbers.h> #include <sys/types.h> __BEGIN_DECLS -typedef void (*__sighandler_t)(int); -typedef __sighandler_t sighandler_t; - -typedef uint32_t sigset_t; -typedef uint32_t sig_atomic_t; - -union sigval { - int sival_int; - void* sival_ptr; -}; - -typedef struct siginfo { - int si_signo; - int si_code; - pid_t si_pid; - uid_t si_uid; - void* si_addr; - int si_status; - union sigval si_value; -} siginfo_t; - -struct sigaction { - union { - void (*sa_handler)(int); - void (*sa_sigaction)(int, siginfo_t*, void*); - }; - sigset_t sa_mask; - int sa_flags; -}; - int kill(pid_t, int sig); int killpg(int pgrp, int sig); sighandler_t signal(int sig, sighandler_t); @@ -60,30 +31,4 @@ const char* getsignalname(int); extern const char* sys_siglist[NSIG]; -#define SIG_DFL ((__sighandler_t)0) -#define SIG_ERR ((__sighandler_t)-1) -#define SIG_IGN ((__sighandler_t)1) - -#define SA_NOCLDSTOP 1 -#define SA_NOCLDWAIT 2 -#define SA_SIGINFO 4 -#define SA_ONSTACK 0x08000000 -#define SA_RESTART 0x10000000 -#define SA_NODEFER 0x40000000 -#define SA_RESETHAND 0x80000000 - -#define SA_NOMASK SA_NODEFER -#define SA_ONESHOT SA_RESETHAND - -#define SIG_BLOCK 0 -#define SIG_UNBLOCK 1 -#define SIG_SETMASK 2 - -#define CLD_EXITED 0 -#define CLD_KILLED 1 -#define CLD_DUMPED 2 -#define CLD_TRAPPED 3 -#define CLD_STOPPED 4 -#define CLD_CONTINUED 5 - __END_DECLS |