2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Initialize resident modules
8 #include "exec_intern.h"
9 #include <exec/resident.h>
10 #include <proto/exec.h>
12 #include <aros/debug.h>
14 /*****************************************************************************
18 AROS_LH2(void, InitCode
,
21 AROS_LHA(ULONG
, startClass
, D0
),
22 AROS_LHA(ULONG
, version
, D1
),
25 struct ExecBase
*, SysBase
, 12, Exec
)
28 Traverse the ResModules array and InitResident() all modules with
29 versions greater than or equal to version, and of a class equal to
33 startClass - which type of module to start
34 version - a version number
48 *****************************************************************************/
51 AROS_LIBBASE_EXT_DECL(struct ExecBase
*,SysBase
)
53 ULONG
*list
= SysBase
->ResModules
;
55 D(bug("enter InitCode(0x%x, %d)\n", startClass
, version
));
62 If bit 31 is set, this doesn't point to a Resident module, but
63 to another list of modules.
65 if(*list
& 0x80000000) list
= (ULONG
*)(*list
& 0x7fffffff);
67 if( (((struct Resident
*)*list
)->rt_Version
>= (UBYTE
)version
)
68 && (((struct Resident
*)*list
)->rt_Flags
& (UBYTE
)startClass
) )
70 D(bug("calling InitResident(\"%s\", NULL)\n",
71 ((struct Resident
*)(*list
))->rt_Name
));
72 InitResident((struct Resident
*)*list
, NULL
);
75 D(bug("NOT calling InitResident(\"%s\", NULL)\n",
76 ((struct Resident
*)(*list
))->rt_Name
)
82 D(bug("leave InitCode(0x%x, %d)\n", startClass
, version
));