1/*
2 *  include/linux/signalfd.h
3 *
4 *  Copyright (C) 2007  Davide Libenzi <davidel@xmailserver.org>
5 *
6 */
7#ifndef _LINUX_SIGNALFD_H
8#define _LINUX_SIGNALFD_H
9
10#include <uapi/linux/signalfd.h>
11
12
13#ifdef CONFIG_SIGNALFD
14
15/*
16 * Deliver the signal to listening signalfd.
17 */
18static inline void signalfd_notify(struct task_struct *tsk, int sig)
19{
20	if (unlikely(waitqueue_active(&tsk->sighand->signalfd_wqh)))
21		wake_up(&tsk->sighand->signalfd_wqh);
22}
23
24extern void signalfd_cleanup(struct sighand_struct *sighand);
25
26#else /* CONFIG_SIGNALFD */
27
28static inline void signalfd_notify(struct task_struct *tsk, int sig) { }
29
30static inline void signalfd_cleanup(struct sighand_struct *sighand) { }
31
32#endif /* CONFIG_SIGNALFD */
33
34#endif /* _LINUX_SIGNALFD_H */
35