LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Questions about System Calls (https://www.linuxquestions.org/questions/programming-9/questions-about-system-calls-558858/)

BrokenFighter 06-03-2007 02:28 PM

Questions about System Calls
 
Hello all,

I just want to ask a few questions about system calls in linux...

1-) Why do we use asm_linkage while adding a system call??

2-) What does copy_from_user and copy_to user do?? And which situations do we use these functions??

3-) How does an operating system understand that a called function is a system call and how it reacts??


As you see my questions are theoric because I should learn the theory of system calls... :)

If you help me, I will be pleased...

Regards...

Mara 06-03-2007 04:04 PM

2. To copy between user-space and kernel-space. You use it always when you have structures, buffers etc that you need to use in the kernel.
3. Depends on the architecture. It doesn't detect, in fact. There's just a special instruction (one or more) that switches the processor to kernel mode.


All times are GMT -5. The time now is 06:53 PM.