diff options
| author | Stephen Rothwell <sfr@canb.auug.org.au> | 2003-02-14 20:38:11 -0800 |
|---|---|---|
| committer | Jens Axboe <axboe@suse.de> | 2003-02-14 20:38:11 -0800 |
| commit | 424706ad4e048c933773cfabf0244cb80bbc8e64 (patch) | |
| tree | b4069ad4daf4578349912d7bcf1ab3a31f813465 /kernel/compat.c | |
| parent | fcc21ee29a39fd47d119e12997d2b09d97083e28 (diff) | |
[PATCH] compat_sys_futex 1/3 generic, parisc, ppc64, s390x and x86_64
This is the generic part of the patch and the architecture specific parts
I have been asked to forward directly to you.
Diffstat (limited to 'kernel/compat.c')
| -rw-r--r-- | kernel/compat.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/kernel/compat.c b/kernel/compat.c index 0c51a4de67a8..892b49f14f5f 100644 --- a/kernel/compat.c +++ b/kernel/compat.c @@ -16,6 +16,7 @@ #include <linux/errno.h> #include <linux/time.h> #include <linux/signal.h> +#include <linux/sched.h> /* for MAX_SCHEDULE_TIMEOUT */ #include <asm/uaccess.h> @@ -208,3 +209,19 @@ asmlinkage long compat_sys_sigprocmask(int how, compat_old_sigset_t *set, ret = put_user(s, oset); return ret; } + +extern long do_futex(u32 *, int, int, unsigned long); + +asmlinkage long compat_sys_futex(u32 *uaddr, int op, int val, + struct compat_timespec *utime) +{ + struct timespec t; + unsigned long timeout = MAX_SCHEDULE_TIMEOUT; + + if ((op == FUTEX_WAIT) && utime) { + if (get_compat_timespec(&t, utime)) + return -EFAULT; + timeout = timespec_to_jiffies(t) + 1; + } + return do_futex((unsigned long)uaddr, op, val, timeout); +} |
