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 04-02-2009, 08:01 AM   #1
brian1125
LQ Newbie
 
Registered: Mar 2009
Posts: 2

Rep: Reputation: 0
Question can i test new system call before compiling kernel??????


hello everybody~
I want to test my system call that be goint to add to kernel,
But when i finish compiling kernel, i found my system call code not work.
the code i want to return the system time "struct timespec":

/*----------Start of mycall.c----------*/
#include <linux/linkage.h>
#include <linux/time.h>
#include <linux/kernel.h>

asmlinkage struct timespec sys_mycall(void) {
struct timespec now;
now=current_kernel_time();
printk(KERN_EMERG "the 320 system call run success!!!!\n ");
return now;

}
/*-----------End of mycall.c-----------*/



so i want a method to test the new system call before compiling kernel.
if you know the method or tool, please tell me
thank you

Last edited by brian1125; 04-02-2009 at 08:03 AM.
 
Old 04-03-2009, 12:11 AM   #2
Recursion
LQ Newbie
 
Registered: Apr 2009
Posts: 27

Rep: Reputation: 17
Im sorry but no. You need to build(make) the kernel before utilization of the new system call. It does suck to be a kernel developer at times.
 
Old 04-03-2009, 07:43 AM   #3
TimothyEBaldwin
Member
 
Registered: Mar 2009
Posts: 249

Rep: Reputation: 27
And you can't return anything other than ints from system calls either. Did you add an entry to the system call table? For every processor architecture?
 
  


Reply

Tags
call, system



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
How to add a system call in 2.6.x kernel SungWon Chung Linux - Kernel 2 11-26-2007 09:32 PM
how to add another system call in to the kernel?? Pratik H Pandya Programming 1 03-26-2006 02:02 AM
new kernel system call Ephracis Programming 1 05-06-2005 10:23 AM
system call to get the kernel version appas Programming 2 10-06-2004 03:51 AM
Adding new System Call to Kernel kurt_ram Linux - General 1 10-22-2002 03:59 PM

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

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