lkml.org 
[lkml]   [2006]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kernel hook...
* omkar lagu <omkarlagu@yahoo.com> [2006-02-18 06:51:52 -0800]:

> hi all,
>
> help needed..
> we want to call a function from the kernel code which
> is defined in our module and the function should be
> only called when we insert our module in the kernel.
> we are really struggling with this..can anyone suggest
> a solution for this with a example.
>
> thanks in advance

static int __init init_my_module (void) {
call_function();

return 0;
}
EXPORT_SYMBOL(init_my_module);

Marc
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-02-18 17:58    [W:0.166 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site