patch-2.1.113 linux/include/asm-m68k/unistd.h

Next file: linux/include/linux/amifd.h
Previous file: linux/include/asm-m68k/termios.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.112/linux/include/asm-m68k/unistd.h linux/include/asm-m68k/unistd.h
@@ -190,6 +190,7 @@
 #define __NR_getcwd		183
 #define __NR_capget		184
 #define __NR_capset		185
+#define __NR_sigaltstack	186
 
 /* user-visible error numbers are in the range -1 - -122: see
    <asm-m68k/errno.h> */
@@ -329,13 +330,16 @@
  */
 static inline pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
 {
-	register long retval __asm__ ("d0") = __NR_clone;
-	register long clone_arg __asm__ ("d1") = flags | CLONE_VM;
+	pid_t pid;
 	mm_segment_t fs;
 
 	fs = get_fs();
 	set_fs (KERNEL_DS);
 
+	{
+	register long retval __asm__ ("d0");
+	register long clone_arg __asm__ ("d1") = flags | CLONE_VM;
+
 	__asm__ __volatile__
 	  ("clrl %%d2\n\t"
 	   "trap #0\n\t"		/* Linux/m68k system call */
@@ -352,9 +356,11 @@
 	   : "0" (__NR_clone), "i" (__NR_exit),
 	     "r" (arg), "a" (fn), "d" (clone_arg), "r" (current)
 	   : "d0", "d2");
+	pid = retval;
+	}
 
 	set_fs (fs);
-	return retval;
+	return pid;
 }
 
 static inline pid_t wait(int * wait_stat)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov