LinuxQuestions.org
Review your favorite Linux distribution.
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 08-08-2008, 03:03 AM   #1
linuxdoniv
Member
 
Registered: Mar 2008
Posts: 63

Rep: Reputation: 15
Calling a system call in a kernel module


Hi,

an application can call a system call on a file, and based on the file type, proper implementation of the system call is chosen (using struct file_operations definition of a file ) and system call is executed.

Can a system call be called in a kernel module itself. Say a daemon running in kernel mode has to write something to the memory often, Then would not it be making system calls..?

Thanks....
 
Old 08-08-2008, 03:06 AM   #2
linuxdoniv
Member
 
Registered: Mar 2008
Posts: 63

Original Poster
Rep: Reputation: 15
also I think system calls are always made with file as one of the arguments...

are there any system calls made without specifying the file as argument. (as there is a need to switch to the kernel mode only when there is some hardware operation and all things are files in linux .. )
 
Old 08-08-2008, 03:22 AM   #3
alex1983-0112
Member
 
Registered: Apr 2008
Location: Russia
Distribution: Fedora Core
Posts: 30

Rep: Reputation: 16
int 0x80 ?
 
Old 08-08-2008, 03:28 AM   #4
alex1983-0112
Member
 
Registered: Apr 2008
Location: Russia
Distribution: Fedora Core
Posts: 30

Rep: Reputation: 16
Quote:
Originally Posted by linuxdoniv View Post
are there any system calls made without specifying the file as argument.
Yes, but instead name of file in argument you must to point a file descriptor.
 
  


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
Can a kernel module call the function of another kernel module sceadu Programming 3 05-02-2011 02:22 AM
system call to insert a module in kernel sharad Linux - General 1 03-22-2007 04:15 AM
I want add my own system call using LKM (loadable kernel module)... raga4223688 Linux - Software 1 03-07-2007 07:21 AM
system call to load and unload the module in kernel sharad Linux - Kernel 3 03-01-2007 05:00 AM
Calling a system call from a system call? Loc_8 Programming 0 09-16-2006 04:21 PM

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

All times are GMT -5. The time now is 07:30 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