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... |
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. |