* Anthony Chee <anthony.chee@polyu.edu.hk> [020324 11:17]:
> I am now developing a module. This module need communicate with the kernel.
> So I exported a function func(), by using EXPORT_SYMBOL(func). In the header
> file, I set "extern int func()".
<snip>
The problem you face is that the kernel needs to know where foo is to
generate a the bytecode that calls it. Here is a better scenario...
You expose an interface in the kernel such as
typedef void (*func_t)(int);
void register_func ( func_t func );
EXPORT_SYMBOL (register_func);
Then in your modules you call 'register_func' and that will pass the
function in question to the kernel. The kernel can then do whatever it
wants to that pointer (like call it).
B.
-- WebSig: http://www.jukie.net/~bart/sig/
This archive was generated by hypermail 2b29 : Sun Mar 31 2002 - 22:00:10 EST