LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-02-2004, 01:11 AM   #1
ryanux
LQ Newbie
 
Registered: Sep 2003
Posts: 7

Rep: Reputation: 0
Question about external variable in kernel.


I want to use a external variable announced by myself in kernel in difference situation.One is evaluating it with the function(copy_from_user)in user space,the other is check it in my loadable module.for example:
file.h
struct some_struct variable;
struct some_struct* variableptr = &variable;

linux_kernel/kernel/sys.c
#include file.h
unsigned int som_function()
{
copy_from_user(...);
do something;

}
EXPORT_SYMBOL(variable);
EXPORT_SYMBOL(variableptr);
my_module.c
some_module_function()
{
struct some_struct ptr;
ptr = variableptr;
do something;
}
Here is the question.
I found the variableptr's value were difference between two situation.I couldnt use this external variable correctly.Why?Does anyone know it?
thanks a lot.
 
  


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
python variable question bendeco13 Programming 6 02-03-2005 07:22 AM
shell question variable substitution dpressm Programming 9 11-18-2004 07:00 AM
[c shell] variable question saiz66 Programming 5 09-29-2004 09:45 AM
question about $_ (default variable) in Perl realos Programming 4 07-04-2003 05:09 PM
Enviromental variable question wr3ck3d Linux - Software 3 05-01-2003 06:44 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

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