Re: Re: global variable

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

 



 


> > (i want to make it a global variable)
>
>If you put a static in a header, then any .c that includes it will
>have its own private copy of that variable.  From what you describe,
>you do not want it to be static.  Define the variable in one .c file
>and declare it extern whereever you want to use it (a header would
>be a good place for something like that).


i am not able to solve it
i think i am making it complex
can you tell me a way
so that /kernel/fork.c
can call a function of /fs/proc/root.c

if i can include the root.c file in the fork.c
then the work becomes easier but i am unable to do it..can i do it ?
how?


if no then what will be other procedure

i just simply want to set a value to a variable in root.c and it should reflect the value in fork.c(it can access the changed value)

can you tell me any other way out
thanks
i will be very greateful
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