LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-03-2007, 02:28 PM   #1
BrokenFighter
LQ Newbie
 
Registered: Mar 2007
Posts: 7

Rep: Reputation: 0
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...
 
Old 06-03-2007, 04:04 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
linux system calls blanny Programming 4 03-04-2006 12:15 AM
how do you use system calls? slinky2004 General 1 12-22-2005 09:39 PM
Making system calls in C++ harisund Programming 4 11-26-2005 05:58 PM
modifying system calls manjiri Linux - Newbie 3 11-07-2005 01:02 PM
Some system calls Spooky Programming 1 11-24-2004 10:17 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration