lkml.org 
[lkml]   [2001]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: initialisation code
Date
On Wed, 21 Mar 2001 22:00:51 +0530 (IST), 
Manoj Sontakke <manojs@sasken.com> wrote:
> I have a initlisation function (just like pktsched_init in
>TC). Can anyone tell me, where in the kernel boot sequence should I make a
>call to my initialisation function.

Welcome to the wonderful world of magic initialisation.

(1) Declare your initialisation function as int __init foo_init(void).

(2) Decide when your function needs to be called, e.g. after initialisers
for A, B, C but before initialisers for X, Y, Z.

(3) Edit the Makefile to insert obj-$(CONFIG_FOO) after the objects
that contain initialisers A, B, C and before the objects for
initialisers X, Y, Z.

(4) Document why the order of this routine is required! Without docs
in the Makefile we have no idea if object order is correct or not.

-
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: 2005-03-22 13:29    [W:0.048 / U:0.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site