Files
kernel/include/linux/signalfd.h
T

35 lines
747 B
C
Raw Normal View History

2007-05-10 22:23:13 -07:00
/*
* include/linux/signalfd.h
*
* Copyright (C) 2007 Davide Libenzi <davidel@xmailserver.org>
*
*/
#ifndef _LINUX_SIGNALFD_H
#define _LINUX_SIGNALFD_H
2012-10-13 10:46:48 +01:00
#include <uapi/linux/signalfd.h>
2007-05-10 22:23:13 -07:00
#ifdef CONFIG_SIGNALFD
/*
2007-09-20 12:40:16 -07:00
* Deliver the signal to listening signalfd.
2007-05-10 22:23:13 -07:00
*/
static inline void signalfd_notify(struct task_struct *tsk, int sig)
{
2007-09-20 12:40:16 -07:00
if (unlikely(waitqueue_active(&tsk->sighand->signalfd_wqh)))
wake_up(&tsk->sighand->signalfd_wqh);
2007-05-10 22:23:13 -07:00
}
extern void signalfd_cleanup(struct sighand_struct *sighand);
2007-05-10 22:23:13 -07:00
#else /* CONFIG_SIGNALFD */
2007-09-20 12:40:16 -07:00
static inline void signalfd_notify(struct task_struct *tsk, int sig) { }
2007-05-10 22:23:13 -07:00
static inline void signalfd_cleanup(struct sighand_struct *sighand) { }
2007-05-10 22:23:13 -07:00
#endif /* CONFIG_SIGNALFD */
#endif /* _LINUX_SIGNALFD_H */