how to export a symbol from kernel to be accessible in module.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello everyone,
	
Linux kernel version 2.4.24

	ipc/shm.c
		
	static struct ipc_ids shm_ids; 

		I want to access this variable in other kernel modules.
	for this a macro is defined in ipc/shm.c

	#define shm_get(id)     ((struct shmid_kernel *)ipc_get(&shm_ids,id));

	
	for this I have written a function in ipc/shm.c as below: -

	void *sys_getshmhandler(int id){
 	       return (void *)shm_get(id);
	}

	EXPORT_SYMBOL(sys_getshmhandler);

	ipc/Makefile

	export-objs := shm.o.

	The kernel compiles successfully, but when I boot the fresh kernel, I do not get the exported symbol in /proc/ksysm.

	What am I missing?
	Can anybody figure out?

	Thanks in advance.

-- 
Regards,
Saifuddin,
saif@xxxxxxxxxxxxxxx
saifuddin_it@xxxxxxxxxxxx


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux