LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   LKM Global Data (https://www.linuxquestions.org/questions/linux-kernel-70/lkm-global-data-808969/)

AnandM 05-19-2010 07:58 PM

LKM Global Data
 
Hi:

I have been trying to define a Global Char variable array that would
be used by different functions within the same LKM

char * char_array[100]

Initialization of the array works. But when I come back to it by another
LKM function (after executing the main-line Kernel), I find that the
initialization has been over-written !

The main-line kernel calls the LKM by call-back functions that are initialized by the LKM init ... btw. One of these functions initializes the char_array, another uses it ...that is the basic idea.

Is the LKM stack /memory area fair game (i.e. used by the main-line kernel) once the LKM that initialized the char_array returns ?

Any ideas please ? Thanks

nini09 05-19-2010 08:43 PM

Can you attach more code, such as initializing and using code of char_array?


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