Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
[linux-2.6.git] / include / linux / signalfd.h
blobeadbe227c25648824c1bbf851c48b99f6ee5f7da
1 /*
2 * include/linux/signalfd.h
4 * Copyright (C) 2007 Davide Libenzi <davidel@xmailserver.org>
6 */
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 */