annotate src/nucleus/mbi.c @ 9:6da1d56a96a3

cdg-hybrid: import from Magnetite
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 15 Jul 2018 21:08:11 +0000
parents 0f80e1e4dce4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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 /* mbi.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 /* MB - Mailbox Management */
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 the initialization routine for the mailbox */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 /* management 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 /* MBI_Initialize Mailbox Management Initialize*/
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 /* mb_defs.h Mailbox component constants */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 /* */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 /* HISTORY */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 /* */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 /* DATE REMARKS */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 /* */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 /* 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
44 /* 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
45 /* 03-01-1994 Update file copyright informaion, */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 /* resulting in version 1.1 */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 /* */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 /* 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
49 /* 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
50 /* 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
51 /* 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
52 /* numbering scheme) */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 /* 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
54 /* 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
55 /*************************************************************************/
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 #define NU_SOURCE_FILE
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 #include "mb_defs.h" /* Mailbox constants */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 #include "mb_extr.h" /* Mailbox interfaces */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 /* Define external inner-component global data references. */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 extern CS_NODE *MBD_Created_Mailboxes_List;
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 extern UNSIGNED MBD_Total_Mailboxes;
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 extern TC_PROTECT MBD_List_Protect;
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 /*************************************************************************/
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 /* */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 /* FUNCTION */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 /* */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 /* MBI_Initialize */
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 /* DESCRIPTION */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 /* */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 /* This function initializes the data structures that control the */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 /* operation of the Mailbox component (MB). There are no mailboxes */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 /* initially. This routine must be called from Supervisor mode in */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 /* Supervisor/User mode switched kernels. */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 /* */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 /* CALLED BY */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 /* */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 /* INC_Initialize System initialization */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 /* */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 /* CALLS */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 /* */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 /* None */
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 /* INPUTS */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 /* */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 /* None */
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 /* OUTPUTS */
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 /* MBD_Created_Mailboxes_List List of created mailboxes */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 /* MBD_Total_Mailboxes Number of created mailboxes */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 /* MBD_List_Protect Protection for mailbox list */
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 /* HISTORY */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 /* */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 /* DATE REMARKS */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 /* */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 /* 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
106 /* 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
107 /* */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 /*************************************************************************/
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 VOID MBI_Initialize(VOID)
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 {
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 /* Initialize the created mailbox list to NU_NULL. */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 MBD_Created_Mailboxes_List = NU_NULL;
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 /* Initialize the total number of created mailboxes to 0. */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 MBD_Total_Mailboxes = 0;
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 /* Initialize the list protection structure. */
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 MBD_List_Protect.tc_tcb_pointer = NU_NULL;
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
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124
0f80e1e4dce4 src/nucleus: library C code import from FreeNucleus package
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125