[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
asmlinkage
Hi,
"All system calls are marked with the asmlinkage tag, so they all look
to the stack for arguments"
From kernelnewbies.org on the FAQ at "What is asmlinkage ?".
I find this a bit strange :)
Let's take the exemple of the system call dup(0).
The C funtion dup() will call the real dup system call (by tne Interrupt
Software int 0x80). But the arguments of the real system call have to be
passed on registers (0 on ebx for the example).
Becoz when we call a system call, we're generally in user space. So the
stack is different.
So why system calls are marked with the asmlinkage tag ? I don't
understand.
Or perhaps there's or i make a confusion between system call and C
function wrapper of system calls.
Thx
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/