LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 09-16-2006, 04:21 PM   #1
Loc_8
LQ Newbie
 
Registered: Sep 2006
Posts: 1

Rep: Reputation: 0
Calling a system call from a system call?


Is it legal to call a newly defined system call from within another system call (say, vfs_read in /fs/read_write.c for example)?

If so, what do I need to include in read_write.c? A test program in user-space defined the following:

Quote:
#include <ctype.h>
#include <errno.h>
#include "linux-2.6.16/include/asm-i386/unistd.h" // < modified

_syscall2(int, testCall, int, arg01, int, arg02)
...and I was able to use testCall. However, modifying read_write.c with the above lines added complains about "kernel_errno" being undeclared.

(btw, I'm just playing around with the kernel here; I don't expect to be messing with the system calls in a real program)

Any help is greatly appreciated, thanks.
 
  


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
system call to primo Solaris / OpenSolaris 1 05-03-2006 07:15 AM
using system call ej25 Programming 9 11-30-2004 11:45 AM
Is it possible to use system() and get the return value from the system call newguy21 Programming 1 08-11-2004 01:37 PM
System call dami Linux - General 0 11-18-2003 11:18 AM
about system call alchen1999 Programming 10 09-01-2003 03:43 AM

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

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