Re: max agruments in system_calls

From: linux-os
Date: Thu Nov 18 2004 - 07:19:55 EST


On Thu, 18 Nov 2004, Jan Engelhardt wrote:

Huh? You KNOW that you don't have more than 7 registers available
on ix86 so you KNOW that you either need a pointer to a struct (one
parameter) or it won't work.

FYI:
eax = function code
ebx = first parameter
ecx = second parameter
edx = third parameter
esi = fourth parameter
edi = fifth parameter
ebp = sixth parameter

And if you use varargs?



Not relevant. You can't pass your arguments on the stack with
any efficiency (you become Windows) because the user-stack is
just data in the kernel. One would have to copy from the user
stack which is about as inefficient as possible.

Jan Engelhardt
--
Gesellschaft f˙˙r Wissenschaftliche Datenverarbeitung
Am Fassberg, 37077 G˙˙ttingen, www.gwdg.de


Cheers,
Dick Johnson
Penguin : Linux version 2.6.9 on an i686 machine (5537.79 BogoMips).
Notice : All mail here is now cached for review by John Ashcroft.
98.36% of all statistics are fiction.