diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2011-10-30 15:16:49 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2011-10-30 15:16:43 +0100 |
commit | b6ef5bb3d93efb95ba855a628740375c2280a59e (patch) | |
tree | fc26947a0111c7e71085a81e26f12c815f3f4c09 /arch/s390/include/asm/syscall.h | |
parent | ccf45cafb0805978e6f13a672caca0e536e87cad (diff) | |
download | linux-b6ef5bb3d93efb95ba855a628740375c2280a59e.tar.bz2 |
[S390] add TIF_SYSCALL thread flag
Add an explicit TIF_SYSCALL bit that indicates if a task is inside
a system call. The svc_code in the pt_regs structure is now only
valid if TIF_SYSCALL is set. With this definition TIF_RESTART_SVC
can be replaced with TIF_SYSCALL. Overall do_signal is a bit more
readable and it saves a few lines of code.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/syscall.h')
-rw-r--r-- | arch/s390/include/asm/syscall.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/include/asm/syscall.h b/arch/s390/include/asm/syscall.h index 614267f60713..b239ff53b189 100644 --- a/arch/s390/include/asm/syscall.h +++ b/arch/s390/include/asm/syscall.h @@ -26,7 +26,8 @@ extern const unsigned int sys_call_table[]; static inline long syscall_get_nr(struct task_struct *task, struct pt_regs *regs) { - return regs->svc_code ? (regs->svc_code & 0xffff) : -1; + return test_tsk_thread_flag(task, TIF_SYSCALL) ? + (regs->svc_code & 0xffff) : -1; } static inline void syscall_rollback(struct task_struct *task, |