patch-2.1.130 linux/include/asm-i386/unistd.h
Next file: linux/include/asm-m68k/atomic.h
Previous file: linux/include/asm-i386/semaphore.h
Back to the patch index
Back to the overall index
- Lines: 37
- Date:
Tue Nov 24 09:50:48 1998
- Orig file:
v2.1.129/linux/include/asm-i386/unistd.h
- Orig date:
Fri Oct 9 13:27:15 1998
diff -u --recursive --new-file v2.1.129/linux/include/asm-i386/unistd.h linux/include/asm-i386/unistd.h
@@ -306,36 +306,6 @@
return waitpid(-1,wait_stat,0);
}
-/*
- * This is the mechanism for creating a new kernel thread.
- *
- * NOTE! Only a kernel-only process(ie the swapper or direct descendants
- * who haven't done an "execve()") should use this: it will work within
- * a system call from a "real" process, but the process memory space will
- * not be free'd until both the parent and the child have exited.
- */
-static inline pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
-{
- long retval;
-
- __asm__ __volatile__(
- "movl %%esp,%%esi\n\t"
- "int $0x80\n\t" /* Linux/i386 system call */
- "cmpl %%esp,%%esi\n\t" /* child or parent? */
- "je 1f\n\t" /* parent - jump */
- "pushl %3\n\t" /* push argument */
- "call *%4\n\t" /* call fn */
- "movl %2,%0\n\t" /* exit */
- "int $0x80\n"
- "1:\t"
- :"=a" (retval)
- :"0" (__NR_clone), "i" (__NR_exit),
- "r" (arg), "r" (fn),
- "b" (flags | CLONE_VM)
- :"si");
- return retval;
-}
-
#endif
#endif /* _ASM_I386_UNISTD_H_ */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov