Re: Kernel Timer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




  Yes the global variable declared in any file is accessed from other 
functions in the kernel. but they are not visible to a module until and 
unlesss you have exported the symbol using EXPORT_SYMBOL. 

 A module can use only those symbols directly which are in /proc/ksyms

 HTH,
 raghu

On 11 Jan 2003, Rajaram Suresh Gaunker wrote:

> hey can anybody plz tell me , whether a Global variable declared 
> in any file is easily acessible from other functions in kernel
> 
> EXPORT_SYMBOL is the macro to export these global variables ???
> 
> plz clarify this
> bye
> Rajaram
> 
> 
> 
> On Sat, 11 Jan 2003 Nandan Naik wrote :
> >Hey guys,
> >I m trying to schedule a Kernel Timer such that a
> >function I need runs when the timer expires. But with
> >the current way I m doing it, the system always
> >crashes.
> >
> >Heres what I have:
> >
> >.......
> >.......
> >
> >/* Function Prototype */
> >void timerFunction( unsigned long );
> >
> >.......
> >.......
> >
> >/* Global Variables */
> >struct timer_list TimerFunctionTimer;
> >
> >.......
> >.......
> >
> >/* Inside init_module */
> >init_timer ( &TimerFunctionTimer );
> >TimerFunctionTimer.expires = (jiffies + HZ);
> >TimerFunctionTimer.function = timerFunction;
> >add_timer( &TimerFunctionTimer );
> >
> >......
> >......
> >
> >Am I doing something wrong here ? Any help would be
> >greatly appreciated. Thank you.
> >
> >Nandan
> >
> >
> >__________________________________________________
> >Do you Yahoo!?
> >Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> >http://mailplus.yahoo.com
> >--
> >Kernelnewbies: Help each other learn about the Linux kernel.
> >Archive:       http://mail.nl.linux.org/kernelnewbies/
> >FAQ:           http://kernelnewbies.org/faq/
> >
> 
> 
> 
> R@j@r@m
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux