summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morton <akpm@digeo.com>2003-05-25 01:12:37 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2003-05-25 01:12:37 -0700
commitfb39f360f4dc671e1f7843c64fa4624aa945841d (patch)
treed95dbcf9be965d33e67908ba37fb79af119888f8
parente8c0de6e726047aff99ae1519b07d449476d1a7a (diff)
[PATCH] CONFIG_EPOLL
From: Christopher Hoover <ch@murgatroid.com> Here's a patch to drop some more text/data/bss out of 2.5. This time the ``victim'' is eventpollfs (epoll).
-rw-r--r--fs/Makefile4
-rw-r--r--include/linux/eventpoll.h9
-rw-r--r--init/Kconfig7
-rw-r--r--kernel/sys.c3
4 files changed, 22 insertions, 1 deletions
diff --git a/fs/Makefile b/fs/Makefile
index 0462ed4d42db..7bf93d805a00 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -10,7 +10,9 @@ obj-y := open.o read_write.o file_table.o buffer.o \
namei.o fcntl.o ioctl.o readdir.o select.o fifo.o locks.o \
dcache.o inode.o attr.o bad_inode.o file.o dnotify.o \
filesystems.o namespace.o seq_file.o xattr.o libfs.o \
- fs-writeback.o mpage.o direct-io.o aio.o eventpoll.o
+ fs-writeback.o mpage.o direct-io.o aio.o
+
+obj-$(CONFIG_EPOLL) += eventpoll.o
obj-$(CONFIG_COMPAT) += compat.o
diff --git a/include/linux/eventpoll.h b/include/linux/eventpoll.h
index 632c5d6efe6f..8288857d2ade 100644
--- a/include/linux/eventpoll.h
+++ b/include/linux/eventpoll.h
@@ -40,12 +40,21 @@ asmlinkage long sys_epoll_ctl(int epfd, int op, int fd, struct epoll_event *even
asmlinkage long sys_epoll_wait(int epfd, struct epoll_event *events, int maxevents,
int timeout);
+#ifdef CONFIG_EPOLL
+
/* Used to initialize the epoll bits inside the "struct file" */
void eventpoll_init_file(struct file *file);
/* Used in fs/file_table.c:__fput() to unlink files from the eventpoll interface */
void eventpoll_release(struct file *file);
+#else
+
+static inline void eventpoll_init_file(struct file *file) {}
+static inline void eventpoll_release(struct file *file) {}
+
+#endif
+
#endif /* #ifdef __KERNEL__ */
#endif /* #ifndef _LINUX_EVENTPOLL_H */
diff --git a/init/Kconfig b/init/Kconfig
index da63acb275c0..d3a9874335aa 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -125,6 +125,13 @@ config FUTEX
support for "fast userspace mutexes". The resulting kernel may not
run glibc-based applications correctly.
+config EPOLL
+ bool "Enable eventpoll support" if EMBEDDED
+ default y
+ help
+ Disabling this option will cause the kernel to be built without
+ support for epoll family of system calls.
+
endmenu # General setup
diff --git a/kernel/sys.c b/kernel/sys.c
index a4d19c51b00e..5c2c439ae6bc 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -228,6 +228,9 @@ cond_syscall(sys_recvmsg)
cond_syscall(sys_socketcall)
cond_syscall(sys_futex)
cond_syscall(compat_sys_futex)
+cond_syscall(sys_epoll_create)
+cond_syscall(sys_epoll_ctl)
+cond_syscall(sys_epoll_wait)
static int set_one_prio(struct task_struct *p, int niceval, int error)
{