global variable in kernel

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

 



Hi All

I am trying to declare a global variable g_sklist *sklist in net/core/dev.c

g_sklist is a struct which i have defined in include/linux/skbuff.h

I am allocating memory for this structure and assigning values to it in dev.c file (inside a function).

Then I am trying to acess it by declaring it as
extern g_sklist *sklist in file kernel/sched.c
but I am getting NULL here. Can some one explain where am I wrong
or some other way to access global variables inside kernel.


TIA


-sushant

ps:please cc the reply to me

--
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