Updated PCI IDs to latest snapshot.
[tangerine.git] / rom / exec / initcode.c
blob4f6484424b8267566d82d72a38e4a5e085e951ed
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Initialize resident modules
6 Lang: english
7 */
8 #include "exec_intern.h"
9 #include <exec/resident.h>
10 #include <proto/exec.h>
12 #include <aros/debug.h>
14 /*****************************************************************************
16 NAME */
18 AROS_LH2(void, InitCode,
20 /* SYNOPSIS */
21 AROS_LHA(ULONG, startClass, D0),
22 AROS_LHA(ULONG, version, D1),
24 /* LOCATION */
25 struct ExecBase *, SysBase, 12, Exec)
27 /* FUNCTION
28 Traverse the ResModules array and InitResident() all modules with
29 versions greater than or equal to version, and of a class equal to
30 startClass.
32 INPUTS
33 startClass - which type of module to start
34 version - a version number
36 RESULT
38 NOTES
40 EXAMPLE
42 BUGS
44 SEE ALSO
46 INTERNALS
48 *****************************************************************************/
50 AROS_LIBFUNC_INIT
52 IPTR *list = SysBase->ResModules;
54 D(bug("enter InitCode(0x%x, %d)\n", startClass, version));
56 if(list)
58 while(*list)
61 If bit 31 is set, this doesn't point to a Resident module, but
62 to another list of modules.
64 if(*list & 0x80000000) list = (IPTR *)(*list & 0x7fffffff);
66 if( (((struct Resident *)*list)->rt_Version >= (UBYTE)version)
67 && (((struct Resident *)*list)->rt_Flags & (UBYTE)startClass) )
69 D(bug("calling InitResident(\"%s\", NULL)\n",
70 ((struct Resident *)(*list))->rt_Name));
71 InitResident((struct Resident *)*list, NULL);
73 else
74 D(bug("NOT calling InitResident(\"%s\", NULL)\n",
75 ((struct Resident *)(*list))->rt_Name)
77 list++;
81 D(bug("leave InitCode(0x%x, %d)\n", startClass, version));
83 AROS_LIBFUNC_EXIT
84 } /* InitCode */