Note: forwarded message attached.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--- Begin Message ---
- To: Thomas Petazzoni <thomas.petazzoni@xxxxxxxx>
- Subject: Re: Regarding Kernel Timers
- From: durga reddy <sysatus@xxxxxxxxx>
- Date: Wed, 20 Apr 2005 04:57:08 -0700 (PDT)
- In-reply-to: 6667
HiIs the problem is coming for using kernel functions in user space??,and same functions when i am trying to use in kernel module also giving the same erroru can have a glance at the module where i am using the kernel timers.
#include<linux/module.h>
# include<linux/kernel.h>
# include<linux/stddef.h>
# include<linux/timer.h>struct timer_list tEntry;
void print(unsigned long data)
{
printk("<1> print called\n");
init_timer(&tEntry);
tEntry.expires = 50;
tEntry.function = print;
add_timer(&tEntry);
}
int init_module()
{
init_timer(&tEntry);
tEntry.expires = 50;
tEntry.function = print;
add_timer(&tEntry);
return 0;
}
void cleanup_module()
{
printk("<1> Cleaning up\n");
del_timer(&tEntry);
}thanksdurga
Thomas Petazzoni <thomas.petazzoni@xxxxxxxx> wrote:Hello,
durga reddy wrote:
> I want to use kernel timers in my code for calling of specific functions after
> specified time out.
> here i have written a sample code for using timers .but it is giving a error
> whish has given below.
The given code is for an user-space application. Why are you trying to
use kernel functions from an user-space application ?
Sincerly,
Thomas
--
Thomas Petazzoni
thomas.petazzoni@xxxxxxxx
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--- End Message ---