Re: max agruments in system_calls

From: linux-os
Date: Wed Nov 17 2004 - 19:19:41 EST


On Wed, 17 Nov 2004, Sharma Sushant wrote:

Hi All
Can some one tell me, if I want to implement a system call with more than 6 arguments in it, how should I do it? I am using kernel 2.6.3.
I know I can use struct and stuff arguments inside it, but I want to use more
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^__________ yes
than 6 different arguments.

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

You need esp for the call and you need eip for the code. There
are no other registers except segment registers.


Thanks
-Sushant



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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/