It is currently Sat, 04 Feb 2023 12:35:55 GMT



 
Author Message
 sharing global variables between kernel modules
I'm trying to map certain device registers to a user process, as well
as have a streams driver for the device so the normal TCP/IP stacks
can run over it. Since streams drivers don't support mmap, (no user
context) I wrote a skeletal char. driver to mmap the card registers. I
would like the char. driver to have pointers to the structures in the
streams driver, at least to get where the card is mapped in.

However, it seems like the streams driver and char. driver can't share
global variables, although this works between the kernel proper and
the drivers. I first loaded the streams driver, which declared the
global variables. The loader fails to install the char.  driver
however, claiming it can't resolve the shared variables.

The current hack I did was to pass kernel pointers via ioctl's up to a
user process from the streams driver and then back down into the
character driver.

Can the loader resolve when two dynamically loaded modules share global
variables?  If not, am I stuck passing them though a user process?

                                                -Rich



 Tue, 22 Apr 1997 02:54:47 GMT   
 
   [ 1 post ] 

Similar Threads

1. Singleton global variable in a shared library

2. global variable with shared library

3. Global variables inside shared library on Solaris

4. Visibility of global variables in shared libraries

5. Global variable in shared libs

6. Accessing global variables from shared/dynmaic functions.

7. Shared libraries and global variables

8. global variable in shared library?

9. global variable in shared library.

10. Problems with shared libraries and external global variables


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software