netdev
[Top] [All Lists]

Re: Sharing /proc file

To: Niranjan <niranjan_cs2905@xxxxxxxxx>
Subject: Re: Sharing /proc file
From: Stephen Hemminger <shemminger@xxxxxxxx>
Date: Fri, 20 Feb 2004 14:29:14 -0800
Cc: netdev@xxxxxxxxxxx
In-reply-to: <20040220221506.9945.qmail@web40712.mail.yahoo.com>
Organization: Open Source Development Lab
References: <20040220221506.9945.qmail@web40712.mail.yahoo.com>
Sender: netdev-bounce@xxxxxxxxxxx
On Fri, 20 Feb 2004 14:15:06 -0800 (PST)
Niranjan <niranjan_cs2905@xxxxxxxxx> wrote:

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

<Prev in Thread] Current Thread [Next in Thread>