#include <linux/file.h>
#include <linux/poll.h>
#include <linux/init.h>
#include <linux/fs.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/kernel.h>
#include <linux/signal.h>
#include <linux/list.h>
#include <linux/anon_inodes.h>
#include <linux/signalfd.h>
#include <linux/syscalls.h>
#include <linux/proc_fs.h>
#include <linux/compat.h>
void signalfd_cleanup(struct sighand_struct *sighand)
{ … }
struct signalfd_ctx { … };
static int signalfd_release(struct inode *inode, struct file *file)
{ … }
static __poll_t signalfd_poll(struct file *file, poll_table *wait)
{ … }
static int signalfd_copyinfo(struct iov_iter *to, kernel_siginfo_t const *kinfo)
{ … }
static ssize_t signalfd_dequeue(struct signalfd_ctx *ctx, kernel_siginfo_t *info,
int nonblock)
{ … }
static ssize_t signalfd_read_iter(struct kiocb *iocb, struct iov_iter *to)
{ … }
#ifdef CONFIG_PROC_FS
static void signalfd_show_fdinfo(struct seq_file *m, struct file *f)
{ … }
#endif
static const struct file_operations signalfd_fops = …;
static int do_signalfd4(int ufd, sigset_t *mask, int flags)
{ … }
SYSCALL_DEFINE4(signalfd4, int, ufd, sigset_t __user *, user_mask,
size_t, sizemask, int, flags)
{ … }
SYSCALL_DEFINE3(signalfd, int, ufd, sigset_t __user *, user_mask,
size_t, sizemask)
{ … }
#ifdef CONFIG_COMPAT
static long do_compat_signalfd4(int ufd,
const compat_sigset_t __user *user_mask,
compat_size_t sigsetsize, int flags)
{ … }
COMPAT_SYSCALL_DEFINE4(signalfd4, int, ufd,
const compat_sigset_t __user *, user_mask,
compat_size_t, sigsetsize,
int, flags)
{ … }
COMPAT_SYSCALL_DEFINE3(signalfd, int, ufd,
const compat_sigset_t __user *, user_mask,
compat_size_t, sigsetsize)
{ … }
#endif