Print this page
OS-5370 panic in signalfd
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/uts/common/sys/signalfd.h
+++ new/usr/src/uts/common/sys/signalfd.h
1 1 /*
2 2 * This file and its contents are supplied under the terms of the
|
↓ open down ↓ |
2 lines elided |
↑ open up ↑ |
3 3 * Common Development and Distribution License ("CDDL"), version 1.0.
4 4 * You may only use this file in accordance with the terms of version
5 5 * 1.0 of the CDDL.
6 6 *
7 7 * A full copy of the text of the CDDL should have accompanied this
8 8 * source. A copy of the CDDL is also available via the Internet at
9 9 * http://www.illumos.org/license/CDDL.
10 10 */
11 11
12 12 /*
13 - * Copyright 2015 Joyent, Inc.
13 + * Copyright 2016 Joyent, Inc.
14 14 */
15 15
16 16 /*
17 17 * Header file to support the signalfd facility. Note that this facility
18 18 * is designed to be binary compatible with the Linux signalfd facility, modulo
19 19 * the signals themselves; values for constants here should therefore exactly
20 20 * match those found in Linux, and this facility shouldn't be extended
21 21 * independently of Linux.
22 22 */
23 23
24 24 #ifndef _SYS_SIGNALFD_H
25 25 #define _SYS_SIGNALFD_H
26 26
27 27 #include <sys/types.h>
28 28
29 29 #ifdef __cplusplus
30 30 extern "C" {
31 31 #endif
32 32
33 33 /*
34 34 * To assure binary compatibility with Linux, these values are fixed at their
35 35 * Linux equivalents, not their native ones.
36 36 */
37 37 #define SFD_CLOEXEC 02000000 /* LX_O_CLOEXEC */
38 38 #define SFD_NONBLOCK 04000 /* LX_O_NONBLOCK */
39 39
40 40 /*
41 41 * These ioctl values are specific to the native implementation; applications
42 42 * shouldn't be using them directly, and they should therefore be safe to
43 43 * change without breaking apps.
44 44 */
45 45 #define SIGNALFDIOC (('s' << 24) | ('f' << 16) | ('d' << 8))
46 46 #define SIGNALFDIOC_MASK (SIGNALFDIOC | 1) /* set mask */
47 47
48 48 typedef struct signalfd_siginfo {
49 49 uint32_t ssi_signo; /* signal from signal.h */
50 50 int32_t ssi_errno; /* error from errno.h */
51 51 int32_t ssi_code; /* signal code */
52 52 uint32_t ssi_pid; /* PID of sender */
53 53 uint32_t ssi_uid; /* real UID of sender */
54 54 int32_t ssi_fd; /* File descriptor (SIGIO) */
55 55 uint32_t ssi_tid; /* unused */
56 56 uint32_t ssi_band; /* band event (SIGIO) */
57 57 uint32_t ssi_overrun; /* unused */
58 58 uint32_t ssi_trapno; /* trap number that caused signal */
59 59 int32_t ssi_status; /* exit status or signal (SIGCHLD) */
60 60 int32_t ssi_int; /* unused */
61 61 uint64_t ssi_ptr; /* unused */
62 62 uint64_t ssi_utime; /* user CPU time consumed (SIGCHLD) */
63 63 uint64_t ssi_stime; /* system CPU time consumed (SIGCHLD) */
64 64 uint64_t ssi_addr; /* address that generated signal */
65 65 uint8_t ssi_pad[48]; /* Pad size to 128 bytes to allow for */
66 66 /* additional fields in the future. */
67 67 } signalfd_siginfo_t;
|
↓ open down ↓ |
44 lines elided |
↑ open up ↑ |
68 68
69 69 #ifndef _KERNEL
70 70
71 71 extern int signalfd(int, const sigset_t *, int);
72 72
73 73 #else
74 74
75 75 #define SIGNALFDMNRN_SIGNALFD 0
76 76 #define SIGNALFDMNRN_CLONE 1
77 77
78 -typedef struct sigfd_wake_list {
79 - list_node_t sigfd_wl_lst;
80 - void *sigfd_wl_state;
81 -} sigfd_wake_list_t;
82 -
83 78 /*
84 79 * This holds the proc_t state for a process which is using signalfd.
80 + * Its presence and contents are protected by p_lock.
85 81 */
86 82 typedef struct sigfd_proc_state {
87 83 void (*sigfd_pollwake_cb)(void *, int);
88 84 list_t sigfd_list;
89 85 } sigfd_proc_state_t;
90 86
91 87
92 88 extern void (*sigfd_exit_helper)();
93 89
94 90 #endif /* _KERNEL */
95 91
96 92 #ifdef __cplusplus
97 93 }
98 94 #endif
99 95
100 96 #endif /* _SYS_SIGNALFD_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX