int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
{
eax = __NR_clone;
ebx = flags | CLONE_VM;
somereg1 = arg;
somereg2 = fn;
esi = esp;
int $0x80;
if (esp != esi)
{
eax = somereg1;
somereg2 (somereg1);
eax = __NR_exit;
int $0x80;
}
return eax;
}
Questions:
1. Why isn't ecx set to a stack pointer before the clone system call?
2. Why isn't ebx set to a status code before the exit system call?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/