[SSI] openssi/kernel/arch/x86_64/ia32 ia32_signal.c, 1.1.3.2.2.2, 1.1.3.2.2.3

John Hughes <[email protected]> Tue, 20 Apr 2010 21:56:12 +0000
Newsgroups gmane.linux.cluster.ssic.cvs
Message-ID <[email protected]>
Update of /cvsroot/ssic-linux/openssi/kernel/arch/x86_64/ia32
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv29876/ia32

Modified Files:
      Tag: OPENSSI-DEBIAN
	ia32_signal.c 
Log Message:
Add migration code for x86_64

Index: ia32_signal.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/arch/x86_64/ia32/ia32_signal.c,v
retrieving revision 1.1.3.2.2.2
retrieving revision 1.1.3.2.2.3
diff -u -d -r1.1.3.2.2.2 -r1.1.3.2.2.3
--- ia32_signal.c	20 Apr 2010 18:50:43 -0000	1.1.3.2.2.2
+++ ia32_signal.c	20 Apr 2010 21:56:09 -0000	1.1.3.2.2.3
@@ -117,6 +117,9 @@
 		 struct pt_regs *regs)
 {
 	sigset_t saveset;
+#ifdef CONFIG_SSI
+	unsigned long orig_rip = regs->rip;
+#endif
 
 	mask &= _BLOCKABLE;
 	spin_lock_irq(&current->sighand->siglock);
@@ -129,8 +132,24 @@
 	while (1) {
 		current->state = TASK_INTERRUPTIBLE;
 		schedule();
+#ifdef CONFIG_SSI
+		/*
+		 * If a signal is processed, the value in eax will be changed
+		 * from -ERESTARTNOHAND to -EINTR before the sigcontext is
+		 * set up and the instruction pointer will not be changed;
+		 * if a signal is not processed, then the instruction pointer
+		 * will have been changed to restart the system call and we
+		 * must fix it if we don't migrate. (We don't care about the
+		 * value in eax in that case.) On i386, we will not return to
+		 * here if we successfully migrate.
+		 */
+		regs->rax = -ERESTARTNOHAND;
+#endif
 		if (do_signal(regs, &saveset))
 			return -EINTR;
+#ifdef CONFIG_SSI
+		regs->rip = orig_rip;
+#endif
 	}
 }
 


------------------------------------------------------------------------------