diff options
author | Al Viro <viro@ZenIV.linux.org.uk> | 2012-08-19 04:40:59 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-08-19 17:41:19 +0200 |
commit | be53db6e4edd9dc013b21a929ad2b142dea8b9c0 (patch) | |
tree | 7c4604295375f432071c2077362df2e6c278af53 /arch/alpha/include/asm | |
parent | alpha: Use new generic strncpy_from_user() and strnlen_user() (diff) | |
download | linux-be53db6e4edd9dc013b21a929ad2b142dea8b9c0.tar.xz linux-be53db6e4edd9dc013b21a929ad2b142dea8b9c0.zip |
alpha: take a bunch of syscalls into osf_sys.c
New helper: current_thread_info(). Allows to do a bunch of odd syscalls
in C. While we are at it, there had never been a reason to do
osf_getpriority() in assembler. We also get "namespace"-aware (read:
consistent with getuid(2), etc.) behaviour from getx?id() syscalls now.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Michael Cree <mcree@orcon.net.nz>
Acked-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/alpha/include/asm')
-rw-r--r-- | arch/alpha/include/asm/ptrace.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/alpha/include/asm/ptrace.h b/arch/alpha/include/asm/ptrace.h index fd698a174f26..b87755a19554 100644 --- a/arch/alpha/include/asm/ptrace.h +++ b/arch/alpha/include/asm/ptrace.h @@ -76,7 +76,10 @@ struct switch_stack { #define task_pt_regs(task) \ ((struct pt_regs *) (task_stack_page(task) + 2*PAGE_SIZE) - 1) -#define force_successful_syscall_return() (task_pt_regs(current)->r0 = 0) +#define current_pt_regs() \ + ((struct pt_regs *) ((char *)current_thread_info() + 2*PAGE_SIZE) - 1) + +#define force_successful_syscall_return() (current_pt_regs()->r0 = 0) #endif |