2 * include/linux/signalfd.h
4 * Copyright (C) 2007 Davide Libenzi <davidel@xmailserver.org>
7 #ifndef _LINUX_SIGNALFD_H
8 #define _LINUX_SIGNALFD_H
10 #include <uapi/linux/signalfd.h>
13 #ifdef CONFIG_SIGNALFD
16 * Deliver the signal to listening signalfd.
18 static inline void signalfd_notify(struct task_struct *tsk, int sig)
20 if (unlikely(waitqueue_active(&tsk->sighand->signalfd_wqh)))
21 wake_up(&tsk->sighand->signalfd_wqh);
24 extern void signalfd_cleanup(struct sighand_struct *sighand);
26 #else /* CONFIG_SIGNALFD */
28 static inline void signalfd_notify(struct task_struct *tsk, int sig) { }
30 static inline void signalfd_cleanup(struct sighand_struct *sighand) { }
32 #endif /* CONFIG_SIGNALFD */
34 #endif /* _LINUX_SIGNALFD_H */