Commit e8c0de6e authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] CONFIG_FUTEX

From: Christopher Hoover <ch@murgatroid.com>

Not everyone needs futex support, so it should be optional.  This is needed
for small platforms.
parent 20378c29
......@@ -14,4 +14,7 @@ asmlinkage long sys_futex(u32 __user *uaddr, int op, int val,
struct timespec __user *utime, u32 __user *uaddr2);
long do_futex(unsigned long uaddr, int op, int val,
unsigned long timeout, unsigned long uaddr2, int val2);
#endif
......@@ -108,7 +108,24 @@ config LOG_BUF_SHIFT
13 => 8 KB
12 => 4 KB
endmenu
menuconfig EMBEDDED
bool "Remove kernel features (for embedded systems)"
help
This option allows certain base kernel features to be removed from
the build. This is for specialized environments which can tolerate
a "non-standard" kernel. Only use this if you really know what you
are doing.
config FUTEX
bool "Enable futex support" if EMBEDDED
default y
help
Disabling this option will cause the kernel to be built without
support for "fast userspace mutexes". The resulting kernel may not
run glibc-based applications correctly.
endmenu # General setup
menu "Loadable module support"
......@@ -181,4 +198,3 @@ config KMOD
in <file:Documentation/kmod.txt>.
endmenu
......@@ -5,9 +5,10 @@
obj-y = sched.o fork.o exec_domain.o panic.o printk.o profile.o \
exit.o itimer.o time.o softirq.o resource.o \
sysctl.o capability.o ptrace.o timer.o user.o \
signal.o sys.o kmod.o workqueue.o futex.o pid.o \
signal.o sys.o kmod.o workqueue.o pid.o \
rcupdate.o intermodule.o extable.o params.o posix-timers.o
obj-$(CONFIG_FUTEX) += futex.o
obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o
obj-$(CONFIG_SMP) += cpu.o
obj-$(CONFIG_UID16) += uid16.o
......
......@@ -18,6 +18,7 @@
#include <linux/signal.h>
#include <linux/sched.h> /* for MAX_SCHEDULE_TIMEOUT */
#include <linux/futex.h> /* for FUTEX_WAIT */
#include <linux/unistd.h>
#include <asm/uaccess.h>
......@@ -211,9 +212,7 @@ asmlinkage long compat_sys_sigprocmask(int how, compat_old_sigset_t *set,
return ret;
}
extern long do_futex(unsigned long uaddr, int op, int val,
unsigned long timeout, unsigned long uaddr2, int val2);
#ifdef CONFIG_FUTEX
asmlinkage long compat_sys_futex(u32 *uaddr, int op, int val,
struct compat_timespec *utime)
{
......@@ -231,6 +230,7 @@ asmlinkage long compat_sys_futex(u32 *uaddr, int op, int val,
return do_futex((unsigned long)uaddr, op, val, timeout, uaddr2, val2);
}
#endif
asmlinkage long sys_setrlimit(unsigned int resource, struct rlimit *rlim);
......
......@@ -226,6 +226,8 @@ cond_syscall(sys_shutdown)
cond_syscall(sys_sendmsg)
cond_syscall(sys_recvmsg)
cond_syscall(sys_socketcall)
cond_syscall(sys_futex)
cond_syscall(compat_sys_futex)
static int set_one_prio(struct task_struct *p, int niceval, int error)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment