lkml.org 
[lkml]   [2004]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 5/11] - UML - redundant argument removal from handle_signal
Date
From
From Bodo Stroesser - Change the interface to handle_signal so that it
doesn't take the system call return value as an argument and eliminate
its return value.
kern_do_signal also now doesn't return immediately after determining that
there is no signal to deliver.

Signed-off-by: Jeff Dike <jdike@addtoit.com>

Index: 2.6.9/arch/um/kernel/signal_kern.c
===================================================================
--- 2.6.9.orig/arch/um/kernel/signal_kern.c 2004-11-12 13:42:57.000000000 -0500
+++ 2.6.9/arch/um/kernel/signal_kern.c 2004-11-12 18:05:28.000000000 -0500
@@ -40,19 +40,19 @@
*/
static void handle_signal(struct pt_regs *regs, unsigned long signr,
struct k_sigaction *ka, siginfo_t *info,
- sigset_t *oldset, int error)
+ sigset_t *oldset)
{
__sighandler_t handler;
void (*restorer)(void);
unsigned long sp;
sigset_t save;
- int err, ret;
+ int err, error, ret;

- err = PT_REGS_SYSCALL_RET(&current->thread.regs);
+ error = PT_REGS_SYSCALL_RET(&current->thread.regs);
ret = 0;
/* Always make any pending restarted system calls return -EINTR */
current_thread_info()->restart_block.fn = do_no_restart_syscall;
- switch(err){
+ switch(error){
case -ERESTART_RESTARTBLOCK:
case -ERESTARTNOHAND:
ret = -EINTR;
@@ -115,7 +115,7 @@
force_sigsegv(signr, current);
}

-static int kern_do_signal(struct pt_regs *regs, sigset_t *oldset, int error)
+static int kern_do_signal(struct pt_regs *regs, sigset_t *oldset)
{
struct k_sigaction ka_copy;
siginfo_t info;
@@ -127,7 +127,7 @@
sig = get_signal_to_deliver(&info, &ka_copy, regs, NULL);
if(sig > 0){
/* Whee! Actually deliver the signal. */
- handle_signal(regs, sig, &ka_copy, &info, oldset, error);
+ handle_signal(regs, sig, &ka_copy, &info, oldset);
return(1);
}

@@ -161,8 +161,7 @@

int do_signal(void)
{
- return(kern_do_signal(&current->thread.regs, NULL,
- PT_REGS_SYSCALL_RET(&current->thread.regs)));
+ return(kern_do_signal(&current->thread.regs, NULL));
}

/*
@@ -183,7 +182,7 @@
while (1) {
current->state = TASK_INTERRUPTIBLE;
schedule();
- if(kern_do_signal(&current->thread.regs, &saveset, -EINTR))
+ if(kern_do_signal(&current->thread.regs, &saveset))
return(-EINTR);
}
}
@@ -210,7 +209,7 @@
while (1) {
current->state = TASK_INTERRUPTIBLE;
schedule();
- if (kern_do_signal(&current->thread.regs, &saveset, -EINTR))
+ if (kern_do_signal(&current->thread.regs, &saveset))
return(-EINTR);
}
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:08    [W:1.490 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site