diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-02-08 15:09:58 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:40:46 -0400 |
commit | ac66f3fd89ee20b73b3374e6343c5e36e3e3c51a (patch) | |
tree | 87143604da040f1fa41be8952a2a4fecb663dec7 /arch/x86/kernel/signal_64.c | |
parent | c3e6ff87a3ad9124a67e149e4f9c080626a0d83e (diff) |
x86: reduce trivial style differences in signal_32|64.c
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/signal_64.c')
-rw-r--r-- | arch/x86/kernel/signal_64.c | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c index 1c83e5124c65..863cebe8e60a 100644 --- a/arch/x86/kernel/signal_64.c +++ b/arch/x86/kernel/signal_64.c | |||
@@ -345,7 +345,7 @@ static long current_syscall_ret(struct pt_regs *regs) | |||
345 | 345 | ||
346 | static int | 346 | static int |
347 | handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, | 347 | handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, |
348 | sigset_t *oldset, struct pt_regs *regs) | 348 | sigset_t *oldset, struct pt_regs *regs) |
349 | { | 349 | { |
350 | int ret; | 350 | int ret; |
351 | 351 | ||
@@ -359,21 +359,21 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, | |||
359 | if (current_syscall(regs) >= 0) { | 359 | if (current_syscall(regs) >= 0) { |
360 | /* If so, check system call restarting.. */ | 360 | /* If so, check system call restarting.. */ |
361 | switch (current_syscall_ret(regs)) { | 361 | switch (current_syscall_ret(regs)) { |
362 | case -ERESTART_RESTARTBLOCK: | 362 | case -ERESTART_RESTARTBLOCK: |
363 | case -ERESTARTNOHAND: | 363 | case -ERESTARTNOHAND: |
364 | regs->ax = -EINTR; | 364 | regs->ax = -EINTR; |
365 | break; | 365 | break; |
366 | 366 | ||
367 | case -ERESTARTSYS: | 367 | case -ERESTARTSYS: |
368 | if (!(ka->sa.sa_flags & SA_RESTART)) { | 368 | if (!(ka->sa.sa_flags & SA_RESTART)) { |
369 | regs->ax = -EINTR; | 369 | regs->ax = -EINTR; |
370 | break; | ||
371 | } | ||
372 | /* fallthrough */ | ||
373 | case -ERESTARTNOINTR: | ||
374 | regs->ax = regs->orig_ax; | ||
375 | regs->ip -= 2; | ||
376 | break; | 370 | break; |
371 | } | ||
372 | /* fallthrough */ | ||
373 | case -ERESTARTNOINTR: | ||
374 | regs->ax = regs->orig_ax; | ||
375 | regs->ip -= 2; | ||
376 | break; | ||
377 | } | 377 | } |
378 | } | 378 | } |
379 | 379 | ||
@@ -420,10 +420,11 @@ static void do_signal(struct pt_regs *regs) | |||
420 | sigset_t *oldset; | 420 | sigset_t *oldset; |
421 | 421 | ||
422 | /* | 422 | /* |
423 | * We want the common case to go fast, which | 423 | * We want the common case to go fast, which is why we may in certain |
424 | * is why we may in certain cases get here from | 424 | * cases get here from kernel mode. Just return without doing anything |
425 | * kernel mode. Just return without doing anything | ||
426 | * if so. | 425 | * if so. |
426 | * X86_32: vm86 regs switched out by assembly code before reaching | ||
427 | * here, so testing against kernel CS suffices. | ||
427 | */ | 428 | */ |
428 | if (!user_mode(regs)) | 429 | if (!user_mode(regs)) |
429 | return; | 430 | return; |
@@ -473,16 +474,18 @@ static void do_signal(struct pt_regs *regs) | |||
473 | } | 474 | } |
474 | } | 475 | } |
475 | 476 | ||
476 | /* if there's no signal to deliver, we just put the saved sigmask | 477 | /* |
477 | back. */ | 478 | * If there's no signal to deliver, we just put the saved sigmask |
479 | * back. | ||
480 | */ | ||
478 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) { | 481 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) { |
479 | clear_thread_flag(TIF_RESTORE_SIGMASK); | 482 | clear_thread_flag(TIF_RESTORE_SIGMASK); |
480 | sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); | 483 | sigprocmask(SIG_SETMASK, ¤t->saved_sigmask, NULL); |
481 | } | 484 | } |
482 | } | 485 | } |
483 | 486 | ||
484 | void | 487 | void do_notify_resume(struct pt_regs *regs, void *unused, |
485 | do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) | 488 | __u32 thread_info_flags) |
486 | { | 489 | { |
487 | #ifdef DEBUG_SIG | 490 | #ifdef DEBUG_SIG |
488 | printk("do_notify_resume flags:%x ip:%lx sp:%lx caller:%p pending:%x\n", | 491 | printk("do_notify_resume flags:%x ip:%lx sp:%lx caller:%p pending:%x\n", |
@@ -502,7 +505,7 @@ do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) | |||
502 | #endif /* CONFIG_X86_MCE */ | 505 | #endif /* CONFIG_X86_MCE */ |
503 | 506 | ||
504 | /* deal with pending signal delivery */ | 507 | /* deal with pending signal delivery */ |
505 | if (thread_info_flags & (_TIF_SIGPENDING|_TIF_RESTORE_SIGMASK)) | 508 | if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) |
506 | do_signal(regs); | 509 | do_signal(regs); |
507 | 510 | ||
508 | if (thread_info_flags & _TIF_HRTICK_RESCHED) | 511 | if (thread_info_flags & _TIF_HRTICK_RESCHED) |