diff options
Diffstat (limited to 'usr/src/uts/common/os/sig.c')
-rw-r--r-- | usr/src/uts/common/os/sig.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/usr/src/uts/common/os/sig.c b/usr/src/uts/common/os/sig.c index 0b79c3765a..453b1f22d4 100644 --- a/usr/src/uts/common/os/sig.c +++ b/usr/src/uts/common/os/sig.c @@ -60,6 +60,7 @@ #include <sys/cyclic.h> #include <sys/dtrace.h> #include <sys/sdt.h> +#include <sys/signalfd.h> const k_sigset_t nullsmask = {0, 0, 0}; @@ -94,6 +95,12 @@ const k_sigset_t holdvfork = static int isjobstop(int); static void post_sigcld(proc_t *, sigqueue_t *); + +/* + * signalfd helper function which is set when the signalfd driver loads. + */ +void (*sigfd_exit_helper)(); + /* * Internal variables for counting number of user thread stop requests posted. * They may not be accurate at some special situation such as that a virtually @@ -307,6 +314,11 @@ sigtoproc(proc_t *p, kthread_t *t, int sig) (void) eat_signal(t, sig); thread_unlock(t); DTRACE_PROC2(signal__send, kthread_t *, t, int, sig); + if (p->p_sigfd != NULL && ((sigfd_proc_state_t *) + (p->p_sigfd))->sigfd_pollwake_cb != NULL) + (*((sigfd_proc_state_t *)(p->p_sigfd))-> + sigfd_pollwake_cb)(p, sig); + } else if ((tt = p->p_tlist) != NULL) { /* * Make sure that some lwp that already exists @@ -345,6 +357,10 @@ sigtoproc(proc_t *p, kthread_t *t, int sig) } DTRACE_PROC2(signal__send, kthread_t *, tt, int, sig); + if (p->p_sigfd != NULL && ((sigfd_proc_state_t *) + (p->p_sigfd))->sigfd_pollwake_cb != NULL) + (*((sigfd_proc_state_t *)(p->p_sigfd))-> + sigfd_pollwake_cb)(p, sig); } } |