LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 04-16-2009, 08:13 AM   #1
rheosiva
LQ Newbie
 
Registered: Jan 2008
Location: india
Distribution: Fedora
Posts: 17

Rep: Reputation: 0
Smile How to declare a Global Variable in Kernel


i want to declare a global variable in kernel.. and it should be accessed by all the modules. i will use this global variable to notify any error occurs while init_module of all device drivers.

i tried to declare the global variable in driver itself but i could not able to do it..

Can anyone tell me where i could declare the global variable in kernel,so that it could be accessed by all driver modules..

finally i can use an application to copy the status of all device drivers..

Please give me your suggestions
 
Old 04-17-2009, 12:55 AM   #2
greplinux
Member
 
Registered: Jun 2007
Posts: 118

Rep: Reputation: 17
Have you tried exporting symbols to kernel so that it can be accessed by all modules?

Try using EXPORT_SYMBOL/EXPORT_SYMBOL_GPL

Thanks,
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
add global variable in linux kernel sourcecode sid18 Linux - Kernel 3 01-18-2008 08:43 PM
Declare variable in a script against a command shipon_97 Linux - Newbie 13 12-07-2007 03:17 AM
Where should I declare the global variable ahm_irf Linux - Kernel 5 05-11-2007 11:36 AM
defining global variable in fedora kernel tuncausluer Linux - Software 0 12-31-2004 01:53 PM
Defining Global variable in Fedora Kernel tuncausluer Fedora - Installation 0 12-31-2004 01:38 PM


All times are GMT -5. The time now is 01:16 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration