2 * include/linux/signalfd.h
4 * Copyright (C) 2007 Davide Libenzi <davidel@xmailserver.org>
8 #ifndef _LINUX_SIGNALFD_H
9 #define _LINUX_SIGNALFD_H
12 struct signalfd_siginfo {
31 * Pad strcture to 128 bytes. Remember to update the
32 * pad size when you add new memebers. We use a fixed
33 * size structure to avoid compatibility problems with
34 * future versions, and we leave extra space for additional
35 * members. We use fixed size members because this strcture
36 * comes out of a read(2) and we really don't want to have
37 * a compat on read(2).
45 #ifdef CONFIG_SIGNALFD
48 * Deliver the signal to listening signalfd.
50 static inline void signalfd_notify(struct task_struct *tsk, int sig)
52 if (unlikely(waitqueue_active(&tsk->sighand->signalfd_wqh)))
53 wake_up(&tsk->sighand->signalfd_wqh);
56 #else /* CONFIG_SIGNALFD */
58 static inline void signalfd_notify(struct task_struct *tsk, int sig) { }
60 #endif /* CONFIG_SIGNALFD */
62 #endif /* __KERNEL__ */
64 #endif /* _LINUX_SIGNALFD_H */