Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / include / linux / signalfd.h
blob9a47c380bda8b1310d7d287cdddcf61e095daf1e
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * include/linux/signalfd.h
5 * Copyright (C) 2007 Davide Libenzi <davidel@xmailserver.org>
7 */
8 #ifndef _LINUX_SIGNALFD_H
9 #define _LINUX_SIGNALFD_H
11 #include <uapi/linux/signalfd.h>
12 #include <linux/sched/signal.h>
14 #ifdef CONFIG_SIGNALFD
17 * Deliver the signal to listening signalfd.
19 static inline void signalfd_notify(struct task_struct *tsk, int sig)
21 if (unlikely(waitqueue_active(&tsk->sighand->signalfd_wqh)))
22 wake_up(&tsk->sighand->signalfd_wqh);
25 extern void signalfd_cleanup(struct sighand_struct *sighand);
27 #else /* CONFIG_SIGNALFD */
29 static inline void signalfd_notify(struct task_struct *tsk, int sig) { }
31 static inline void signalfd_cleanup(struct sighand_struct *sighand) { }
33 #endif /* CONFIG_SIGNALFD */
35 #endif /* _LINUX_SIGNALFD_H */