FreeCalypso > hg > fc-selenite
comparison src/nucleus/smi.c @ 7:0f80e1e4dce4
src/nucleus: library C code import from FreeNucleus package
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 15 Jul 2018 20:57:33 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
6:8b2a9a374324 | 7:0f80e1e4dce4 |
---|---|
1 /*************************************************************************/ | |
2 /* */ | |
3 /* Copyright Mentor Graphics Corporation 2002 */ | |
4 /* All Rights Reserved. */ | |
5 /* */ | |
6 /* THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION WHICH IS */ | |
7 /* THE PROPERTY OF MENTOR GRAPHICS CORPORATION OR ITS LICENSORS AND IS */ | |
8 /* SUBJECT TO LICENSE TERMS. */ | |
9 /* */ | |
10 /*************************************************************************/ | |
11 | |
12 /*************************************************************************/ | |
13 /* */ | |
14 /* FILE NAME VERSION */ | |
15 /* */ | |
16 /* smi.c Nucleus PLUS 1.14 */ | |
17 /* */ | |
18 /* COMPONENT */ | |
19 /* */ | |
20 /* SM - Semaphore Management */ | |
21 /* */ | |
22 /* DESCRIPTION */ | |
23 /* */ | |
24 /* This file contains the initialization routine for the semaphore */ | |
25 /* management component. */ | |
26 /* */ | |
27 /* DATA STRUCTURES */ | |
28 /* */ | |
29 /* None */ | |
30 /* */ | |
31 /* FUNCTIONS */ | |
32 /* */ | |
33 /* SMI_Initialize Semaphore Management Init. */ | |
34 /* */ | |
35 /* DEPENDENCIES */ | |
36 /* */ | |
37 /* sm_defs.h Semaphore component constants*/ | |
38 /* */ | |
39 /* HISTORY */ | |
40 /* */ | |
41 /* DATE REMARKS */ | |
42 /* */ | |
43 /* 03-01-1993 Created initial version 1.0 */ | |
44 /* 04-19-1993 Verified version 1.0 */ | |
45 /* 03-01-1994 Modified copyright, resulting in */ | |
46 /* version 1.1 */ | |
47 /* */ | |
48 /* 03-18-1994 Verified version 1.1 */ | |
49 /* 04-17-1996 updated to version 1.2 */ | |
50 /* 03-24-1998 Released version 1.3. */ | |
51 /* 03-26-1999 Released 1.11m (new release */ | |
52 /* numbering scheme) */ | |
53 /* 04-17-2002 Released version 1.13m */ | |
54 /* 11-07-2002 Released version 1.14 */ | |
55 /*************************************************************************/ | |
56 #define NU_SOURCE_FILE | |
57 | |
58 | |
59 #include "sm_defs.h" /* Semaphore constants */ | |
60 #include "sm_extr.h" /* Semaphore interfaces */ | |
61 | |
62 | |
63 /* Define external inner-component global data references. */ | |
64 | |
65 extern CS_NODE *SMD_Created_Semaphores_List; | |
66 extern UNSIGNED SMD_Total_Semaphores; | |
67 extern TC_PROTECT SMD_List_Protect; | |
68 | |
69 | |
70 /*************************************************************************/ | |
71 /* */ | |
72 /* FUNCTION */ | |
73 /* */ | |
74 /* SMI_Initialize */ | |
75 /* */ | |
76 /* DESCRIPTION */ | |
77 /* */ | |
78 /* This function initializes the data structures that control the */ | |
79 /* operation of the Semaphore component (SM). There are no */ | |
80 /* semaphores initially. This routine must be called from */ | |
81 /* Supervisor mode in Supervisor/User mode switching kernels. */ | |
82 /* */ | |
83 /* CALLED BY */ | |
84 /* */ | |
85 /* INC_Initialize System initialization */ | |
86 /* */ | |
87 /* CALLS */ | |
88 /* */ | |
89 /* None */ | |
90 /* */ | |
91 /* INPUTS */ | |
92 /* */ | |
93 /* None */ | |
94 /* */ | |
95 /* OUTPUTS */ | |
96 /* */ | |
97 /* SMD_Created_Semaphores_List List of created semaphores */ | |
98 /* SMD_Total_Semaphores Number of created semaphores */ | |
99 /* SMD_List_Protect Protection for semaphore list*/ | |
100 /* */ | |
101 /* HISTORY */ | |
102 /* */ | |
103 /* DATE REMARKS */ | |
104 /* */ | |
105 /* 03-01-1993 Created initial version 1.0 */ | |
106 /* 04-19-1993 Verified version 1.0 */ | |
107 /* */ | |
108 /*************************************************************************/ | |
109 VOID SMI_Initialize(VOID) | |
110 { | |
111 | |
112 /* Initialize the created semaphore list to NU_NULL. */ | |
113 SMD_Created_Semaphores_List = NU_NULL; | |
114 | |
115 /* Initialize the total number of created semaphores to 0. */ | |
116 SMD_Total_Semaphores = 0; | |
117 | |
118 /* Initialize the list protection structure. */ | |
119 SMD_List_Protect.tc_tcb_pointer = NU_NULL; | |
120 } | |
121 | |
122 | |
123 | |
124 | |
125 |