Skip to contentSkip to conversation

Sharing /proc file

DISCUSSION Niranjan 2 participants 2 messages Feb 20, 2004

Subsystems (2)
lore
Share & tools
lore

Niranjan

author
#0 lore raw

Hi,
Is it possible to share a /proc file between two
kernel modules?
Also, what is the best way to share a structure
between two kernel modules ?

Regards,
-Niranjan

__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

#1 lore raw
Quoted 8 lines · On Fri, 20 Feb 2004 14:15:06 -0800 (PST) Niranjan <[email protected]>…

Hi,
Is it possible to share a /proc file between two
kernel modules?
Also, what is the best way to share a structure
between two kernel modules ?

Regards,
-Niranjan

If the two modules are so interrelated, why have them separate? You can use EXPORT_SYMBOL() to share globals between modules. I can't see a good reason to ever share a single /proc file. The module that defines the symbol must be the one that manages the /proc interaction with that structure.