lkml.org 
[lkml]   [2004]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: max agruments in system_calls
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.044 / U:1.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site