global variable

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

 



 

dear sir

i want to declare and initialise  a static int variable at linux/proc_fs.h
(i want to make it a global variable)

i variable will change its value in the /fs/proc/root.c


and the function is there in /kernel/fork.c which recodes the value of the global variable got changed in the root.c file


as the root.c includes the proc_fs.h
and i am making the fork.c to include the proc_fs.h

but the problem is the fork.c isnt able to identify the changes made in the root.c since there is no direct link..

my question is

how to declare a global variable that will be present in both root.c and fork.c
any changes made in the variable in root.c must reflect in the fork.c

what is the procedure
in which places i have to declare the variables and with what syntax


can you suggest a way to declare a global variable which will reflect in these files
thanks sounak





[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