mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* exporting variables across modules
@ 2007-05-11  3:32 Bhuvan Kumar MITTAL
  0 siblings, 0 replies; only message in thread
From: Bhuvan Kumar MITTAL @ 2007-05-11  3:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: 'Bhuvan Kumar MITTAL'

I have 2 kernel modules. In one module I have 2 global pointers(of type unsigned char and int respectively). I'd like to use these 2 pointers in the other module. I am adopting the following approach but not really sure whether its right or not:

1. I have exported both the pointers using EXPORT_SYMBOL(sym1) and EXPORT_SYMBOL(sym2)

2. Then in the module in which I want to use these pointers I have declared these 2 pointers as global extern variables as:
	extern unsigned char * sym1;
	extern unsigned int * sym2;

Is this the right way to use these pointers? Kindly guide me.

Regards,

Bhuvan



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-05-11  3:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-11  3:32 exporting variables across modules Bhuvan Kumar MITTAL

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®