linux_signal.h (a7ac45761335b1d514804cd0bfe44bdb2c3a3e0c) linux_signal.h (4ab7403bbd76f466d482cd69035091c04e409c09)
1/*-
2 * Copyright (c) 2000 Marcel Moolenaar
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 29 unchanged lines hidden (view full) ---

38#define LINUX_SI_KERNEL 0x80 /* sent by the kernel from somewhere */
39#define LINUX_SI_QUEUE -1 /* sent by sigqueue */
40#define LINUX_SI_TIMER -2 /* sent by timer expiration */
41#define LINUX_SI_MESGQ -3 /* sent by real time mesq state change */
42#define LINUX_SI_ASYNCIO -4 /* sent by AIO completion */
43#define LINUX_SI_SIGIO -5 /* sent by queued SIGIO */
44#define LINUX_SI_TKILL -6 /* sent by tkill system call */
45
1/*-
2 * Copyright (c) 2000 Marcel Moolenaar
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 29 unchanged lines hidden (view full) ---

38#define LINUX_SI_KERNEL 0x80 /* sent by the kernel from somewhere */
39#define LINUX_SI_QUEUE -1 /* sent by sigqueue */
40#define LINUX_SI_TIMER -2 /* sent by timer expiration */
41#define LINUX_SI_MESGQ -3 /* sent by real time mesq state change */
42#define LINUX_SI_ASYNCIO -4 /* sent by AIO completion */
43#define LINUX_SI_SIGIO -5 /* sent by queued SIGIO */
44#define LINUX_SI_TKILL -6 /* sent by tkill system call */
45
46extern int bsd_to_linux_signal[];
47extern int linux_to_bsd_signal[];
48
49int linux_to_bsd_sigaltstack(int lsa);
50int bsd_to_linux_sigaltstack(int bsa);
51void linux_to_bsd_sigset(l_sigset_t *, sigset_t *);
52void bsd_to_linux_sigset(sigset_t *, l_sigset_t *);
53int linux_do_sigaction(struct thread *, int, l_sigaction_t *, l_sigaction_t *);
54void ksiginfo_to_lsiginfo(const ksiginfo_t *ksi, l_siginfo_t *lsi, l_int sig);
55void siginfo_to_lsiginfo(const siginfo_t *si, l_siginfo_t *lsi, l_int sig);
56void lsiginfo_to_ksiginfo(const l_siginfo_t *lsi, ksiginfo_t *ksi, int sig);
57
46int linux_do_sigaction(struct thread *, int, l_sigaction_t *, l_sigaction_t *);
47void ksiginfo_to_lsiginfo(const ksiginfo_t *ksi, l_siginfo_t *lsi, l_int sig);
48void siginfo_to_lsiginfo(const siginfo_t *si, l_siginfo_t *lsi, l_int sig);
49void lsiginfo_to_ksiginfo(const l_siginfo_t *lsi, ksiginfo_t *ksi, int sig);
50
58#define LINUX_SIG_VALID(sig) ((sig) <= LINUX_NSIG && (sig) > 0)
59
60#define BSD_TO_LINUX_SIGNAL(sig) \
61 (((sig) <= LINUX_SIGTBLSZ) ? bsd_to_linux_signal[_SIG_IDX(sig)] : sig)
62
63#endif /* _LINUX_SIGNAL_H_ */
51#endif /* _LINUX_SIGNAL_H_ */