|
From: Nicholas N. <nj...@ca...> - 2004-07-28 18:03:59
|
On Wed, 28 Jul 2004, Tom Hughes wrote: >> I understand it all except the two lines marked '???'. AIUI, the clone() >> system call (as opposed to the library function) only takes two args, >> 'flags' and 'childstack', so %edx and %edi won't be used by it. >> And those registers aren't used again later in the function. But if I >> remove those two lines, some of the reg tests fail so they're obviously >> doing something useful, possibly returning a value? Can someone explain >> what they are doing? > > The manual page is out of date - there are extra arguments now > which are used to store the parent and child TIDs depending on > what flags are set - see sys_clone in arch/i386/kernel/process.c > for code that extracts those pointers. Erk, and so it seems %ecx gets passed to sys_clone too. Any ideas why they didn't use %esi for the 4th arg as usual, but used %edi instead? N |