FreeCalypso > hg > fc-selenite
annotate src/nucleus/inc.c @ 136:7d5b412ffb6c
aci: AT%VBAT and melody play enhancements from Magnetite
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 07 Jan 2019 18:47:52 +0000 |
parents | 0f80e1e4dce4 |
children |
rev | line source |
---|---|
7
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /*************************************************************************/ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 /* Copyright Mentor Graphics Corporation 2002 */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 /* All Rights Reserved. */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 /* THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION WHICH IS */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 /* THE PROPERTY OF MENTOR GRAPHICS CORPORATION OR ITS LICENSORS AND IS */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 /* SUBJECT TO LICENSE TERMS. */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 /*************************************************************************/ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 /*************************************************************************/ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 /* FILE NAME VERSION */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 /* inc.c Nucleus PLUS 1.14 */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 /* COMPONENT */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 /* IN - Initialization */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 /* DESCRIPTION */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 /* This file contains initialization and setup routines associated */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 /* with the initialization component. */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 /* DATA STRUCTURES */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 /* None */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 /* FUNCTIONS */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
33 /* INC_Initialize Common system initialization */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 /* DEPENDENCIES */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
36 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
37 /* in_extr.h Initialization functions */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
38 /* er_extr.h Error handling function */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
39 /* hi_extr.h History functions */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
40 /* tc_extr.h Thread Control functions */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
41 /* mb_extr.h Mailbox functions */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 /* qu_extr.h Queue functions */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 /* pi_extr.h Pipe functions */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 /* sm_extr.h Semaphore functions */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 /* ev_extr.h Event group functions */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 /* pm_extr.h Partition memory functions */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 /* dm_extr.h Dynamic memory functions */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 /* tm_extr.h Timer functions */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 /* io_extr.h I/O Driver functions */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 /* HISTORY */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 /* DATE REMARKS */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 /* 03-01-1993 Created initial version 1.0 */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 /* 04-19-1993 Verified version 1.0 */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 /* 03-01-1994 Replaced void with VOID, */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 /* resulting in version 1.1 */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 /* 03-18-1994 Verified version 1.1 */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 /* 04-17-1996 updated to version 1.2 */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 /* 03-20-1998 Moved the INC_Initialize_State */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 /* define values into their own */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 /* in_defs.h include file as part */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 /* of SPR455. This creates */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 /* version 1.2a. */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 /* 03-24-1998 Released version 1.3. */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 /* 03-26-1999 Released 1.11m (new release */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 /* numbering scheme) */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 /* 04-17-2002 Released version 1.13m */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 /* 11-07-2002 Released version 1.14 */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 /*************************************************************************/ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 #define NU_SOURCE_FILE |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 #include "in_defs.h" /* Initialization defines */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
77 #include "in_extr.h" /* Initialization functions */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
78 #include "hi_extr.h" /* History functions */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 #include "er_extr.h" /* Error handling function */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 #include "tc_extr.h" /* Thread Control functions */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 #include "mb_extr.h" /* Mailbox functions */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 #include "qu_extr.h" /* Queue functions */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 #include "pi_extr.h" /* Pipe functions */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 #include "sm_extr.h" /* Semaphore functions */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 #include "ev_extr.h" /* Event group functions */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 #include "pm_extr.h" /* Partition memory functions*/ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 #include "dm_extr.h" /* Dynamic memory functions */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 #include "tm_extr.h" /* Timer functions */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 #include "io_extr.h" /* I/O Driver functions */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 /* Define global variable that contains the state of initialization. This |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 flag is for information use only. */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 INT INC_Initialize_State; |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 /* Define external functions that access the release and license |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 information. */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 CHAR *RLC_Release_Information(VOID); |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 CHAR *LIC_License_Information(VOID); |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
103 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
104 #if defined(NU_MODULE_SUPPORT) && (NU_MODULE_SUPPORT > 0) |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
105 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
106 /* Prototypes for Module Initialization funcitons */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 STATUS MRC_Initialize(VOID); |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 STATUS MSC_Initialize(VOID); |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 #endif |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 /*************************************************************************/ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
114 /* FUNCTION */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
116 /* INC_Initialize */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 /* DESCRIPTION */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 /* This function is the main initialization function of the system. */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
121 /* All components are initialized by this function. After system */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
122 /* initialization is complete, the Application_Initialize routine */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
123 /* is called. After all initialization is complete, this function */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
124 /* calls TCT_Schedule to start scheduling tasks. */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
125 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
126 /* CALLED BY */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
127 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
128 /* INT_Initialize Target dependent initialize */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
129 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
130 /* CALLS */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
131 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
132 /* Application_Initialize Application initialize */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
133 /* RLC_Release_Information Release information */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
134 /* LIC_License_Information License information */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
135 /* ERI_Initialize Error handling initialize */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
136 /* HII_Initialize History initialization */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
137 /* TCI_Initialize Thread control initialize */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
138 /* MBI_Initialize Mailbox initialize */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
139 /* QUI_Initialize Queue initialize */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
140 /* PII_Initialize Pipe initialize */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
141 /* SMI_Initialize Semaphore initialize */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
142 /* EVI_Initialize Event flag initialize */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
143 /* PMI_Initialize Partition memory initialize */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
144 /* DMI_Initialize Dynamic memory initialize */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
145 /* TMI_Initialize Timer initialize */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
146 /* IOI_Initialize I/O Driver initialize */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
147 /* MRC_Initialize Memory Region initialize */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
148 /* MSC_Initialize Module Support initialize */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
149 /* TCT_Schedule Thread scheduling loop */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
150 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
151 /* INPUTS */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
152 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
153 /* first_available_memory Pointer to available memory */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
154 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
155 /* OUTPUTS */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
156 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
157 /* None */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
158 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
159 /* HISTORY */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
160 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
161 /* DATE REMARKS */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
162 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
163 /* 03-01-1993 Created initial version 1.0 */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
164 /* 04-19-1993 Verified version 1.0 */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
165 /* */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
166 /*************************************************************************/ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
167 VOID INC_Initialize(VOID *first_available_memory) |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
168 { |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
169 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
170 /* Indicate that initialization is starting. */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
171 INC_Initialize_State = INC_START_INITIALIZE; |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
172 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
173 /* Call release information function. */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
174 RLC_Release_Information(); |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
175 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
176 /* Call license information function. */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
177 LIC_License_Information(); |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
178 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
179 /* Initialize the Error handling (ER) component. */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
180 ERI_Initialize(); |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
181 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
182 /* Initialize the History (HI) component. */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
183 HII_Initialize(); |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
184 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
185 #if defined(NU_MODULE_SUPPORT) && (NU_MODULE_SUPPORT > 0) |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
186 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
187 MRC_Initialize(); /* Initialize Memory Region component */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
188 MSC_Initialize(); /* Initialize Module Support component */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
189 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
190 #endif |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
191 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
192 /* Initialize the Thread Control (TC) component. */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
193 TCI_Initialize(); |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
194 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
195 /* Initialize the Mailbox (MB) component. */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
196 MBI_Initialize(); |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
197 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
198 /* Initialize the Queue (QU) component. */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
199 QUI_Initialize(); |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
200 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
201 /* Initialize the Pipe (PI) component. */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
202 PII_Initialize(); |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
203 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
204 /* Initialize the Semaphore (SM) component. */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
205 SMI_Initialize(); |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
206 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
207 /* Initialize the Event Group (EV) component. */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
208 EVI_Initialize(); |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
209 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
210 /* Initialize the Partition memory (PM) component. */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
211 PMI_Initialize(); |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
212 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
213 /* Initialize the Dynamic memory (DM) component. */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
214 DMI_Initialize(); |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
215 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
216 /* Initialize the Timer (TM) component. */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
217 TMI_Initialize(); |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
218 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
219 /* Initialize the I/O Driver (IO) component. */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
220 IOI_Initialize(); |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
221 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
222 /* Invoke the application-supplied initialization function. */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
223 Application_Initialize(first_available_memory); |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
224 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
225 /* Indicate that initialization is finished. */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
226 INC_Initialize_State = INC_END_INITIALIZE; |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
227 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
228 /* Start scheduling threads of execution. */ |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
229 TCT_Schedule(); |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
230 } |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
231 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
232 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
233 |
0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
234 |