LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 01-11-2008, 11:43 PM   #1
sid18
LQ Newbie
 
Registered: Aug 2007
Posts: 19

Rep: Reputation: 0
add global variable in linux kernel sourcecode


hi everybody
plz tell me how to add global variable so that it can be shared by two or more system calls in linux kernel code..
i had included my global structure in fs.h but it gives error while compiling..
is there ny way?
 
Old 01-13-2008, 01:29 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Please include a sketch of the code. It's hard to say what's wrong without it.
 
Old 01-18-2008, 12:09 AM   #3
ashok449
Member
 
Registered: Sep 2007
Location: noida
Distribution: suse
Posts: 63

Rep: Reputation: 16
I am not sure.... try to add in /init/main.c
 
Old 01-18-2008, 08:43 PM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
"Danger, Will Robinson! Danger!"



"Abandon all hope, ye who enter here."
 
  


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
Where should I declare the global variable ahm_irf Linux - Kernel 5 05-11-2007 11:36 AM
How can I define a global variable? kloss Linux - General 4 02-21-2006 04:30 AM
problems with a global variable javier_ccs Programming 2 06-21-2005 12:18 PM
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

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