True Linux Kernel Threads
432 int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
433 { long retval, d0;
436 __asm__ __volatile__(
437 "movl %%esp,%%esi\n\t"
438 "int $0x80\n\t" /* Linux/i386 system call */
439 "cmpl %%esp,%%esi\n\t" /* child or parent? */
440 "je 1f\n\t" /* parent - jump */
444 "movl %4,%%eax\n\t"
445 "pushl %%eax\n\t"
446 "call *%5\n\t" /* call fn */
447 "movl %3,%0\n\t" /* exit */
448 "int $0x80\n"
449 "1:\t"
450 :"=&a" (retval), "=&S" (d0) :"" (__NR_clone), "i" (__NR_exit), "r" (arg), "r" (fn),
453 "b" (flags | CLONE_VM) : "memory");
455 return retval;
456 }/* Linux/arch/i386/kernel/process.c */