FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/nucleus/pm_defs.h @ 143:afceeeb2cba1
Our nuc-fw is destined to become gsm-fw, so I went ahead and did the big hg mv
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Tue, 12 Nov 2013 05:35:48 +0000 |
parents | nuc-fw/nucleus/pm_defs.h@947b1f473960 |
children |
comparison
equal
deleted
inserted
replaced
142:15d5977390c2 | 143:afceeeb2cba1 |
---|---|
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 /* pm_defs.h Nucleus PLUS 1.14 */ | |
17 /* */ | |
18 /* COMPONENT */ | |
19 /* */ | |
20 /* PM - Partition Memory Management */ | |
21 /* */ | |
22 /* DESCRIPTION */ | |
23 /* */ | |
24 /* This file contains data structure definitions and constants for */ | |
25 /* the Partition Memory component. */ | |
26 /* */ | |
27 /* DATA STRUCTURES */ | |
28 /* */ | |
29 /* PM_PCB Partition Pool control block */ | |
30 /* PM_HEADER Header of each partition */ | |
31 /* PM_SUSPEND Partition suspension block */ | |
32 /* */ | |
33 /* FUNCTIONS */ | |
34 /* */ | |
35 /* None */ | |
36 /* */ | |
37 /* DEPENDENCIES */ | |
38 /* */ | |
39 /* cs_defs.h Common service definitions */ | |
40 /* tc_defs.h Thread Control definitions */ | |
41 /* */ | |
42 /* HISTORY */ | |
43 /* */ | |
44 /* DATE REMARKS */ | |
45 /* */ | |
46 /* 03-01-1993 Created initial version 1.0 */ | |
47 /* 04-19-1993 Verified version 1.0 */ | |
48 /* 03-01-1994 Moved include files outside of */ | |
49 /* the file #ifndef to allow the */ | |
50 /* use of actual data structures, */ | |
51 /* removed protect structure, */ | |
52 /* added padding logic, */ | |
53 /* resulting in version 1.1 */ | |
54 /* */ | |
55 /* 03-18-1994 Verified version 1.1 */ | |
56 /* 04-17-1996 updated to version 1.2 */ | |
57 /* 03-24-1998 Released version 1.3 */ | |
58 /* 03-26-1999 Released 1.11m (new release */ | |
59 /* numbering scheme) */ | |
60 /* 04-17-2002 Released version 1.13m */ | |
61 /* 11-07-2002 Released version 1.14 */ | |
62 /*************************************************************************/ | |
63 | |
64 #include "cs_defs.h" /* Common service constants */ | |
65 #include "tc_defs.h" /* Thread control constants */ | |
66 | |
67 | |
68 /* Check to see if the file has been included already. */ | |
69 | |
70 #ifndef PM_DEFS | |
71 #define PM_DEFS | |
72 | |
73 | |
74 /* Define constants local to this component. */ | |
75 | |
76 #define PM_PARTITION_ID 0x50415254UL | |
77 #define PM_OVERHEAD ((sizeof(PM_HEADER) + sizeof(UNSIGNED) \ | |
78 - 1)/sizeof(UNSIGNED)) * \ | |
79 sizeof(UNSIGNED) | |
80 | |
81 | |
82 /* Define the Partition Pool Control Block data type. */ | |
83 | |
84 typedef struct PM_PCB_STRUCT | |
85 { | |
86 CS_NODE pm_created; /* Node for linking to */ | |
87 /* created partition list */ | |
88 UNSIGNED pm_id; /* Internal PCB ID */ | |
89 CHAR pm_name[NU_MAX_NAME]; /* Partition Pool name */ | |
90 VOID *pm_start_address; /* Starting pool address */ | |
91 UNSIGNED pm_pool_size; /* Size of pool */ | |
92 UNSIGNED pm_partition_size; /* Size of each partition */ | |
93 UNSIGNED pm_available; /* Available partitions */ | |
94 UNSIGNED pm_allocated; /* Allocated partitions */ | |
95 struct PM_HEADER_STRUCT | |
96 *pm_available_list; /* Available list */ | |
97 BOOLEAN pm_fifo_suspend; /* Suspension type flag */ | |
98 #if PAD_1 | |
99 DATA_ELEMENT pm_padding[PAD_1]; | |
100 #endif | |
101 UNSIGNED pm_tasks_waiting; /* Number of waiting tasks*/ | |
102 struct PM_SUSPEND_STRUCT | |
103 *pm_suspension_list; /* Suspension list */ | |
104 } PM_PCB; | |
105 | |
106 | |
107 /* Define the header structure that is in front of each memory partition. */ | |
108 | |
109 typedef struct PM_HEADER_STRUCT | |
110 { | |
111 struct PM_HEADER_STRUCT | |
112 *pm_next_available; /* Next available memory */ | |
113 /* partition */ | |
114 PM_PCB *pm_partition_pool; /* Partition pool pointer */ | |
115 } PM_HEADER; | |
116 | |
117 | |
118 /* Define the partition suspension structure. This structure is allocated | |
119 off of the caller's stack. */ | |
120 | |
121 typedef struct PM_SUSPEND_STRUCT | |
122 { | |
123 CS_NODE pm_suspend_link; /* Link to suspend blocks */ | |
124 PM_PCB *pm_partition_pool; /* Pointer to pool */ | |
125 TC_TCB *pm_suspended_task; /* Task suspended */ | |
126 VOID *pm_return_pointer; /* Return memory address */ | |
127 STATUS pm_return_status; /* Return status */ | |
128 } PM_SUSPEND; | |
129 | |
130 #endif | |
131 | |
132 | |
133 | |
134 |