FreeCalypso > hg > freecalypso-sw
comparison nuc-fw/nucleus/pi_defs.h @ 79:947b1f473960
beginning of nuc-fw
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sun, 11 Aug 2013 07:17:25 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
78:2c266d4339ff | 79:947b1f473960 |
---|---|
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 /* pi_defs.h Nucleus PLUS 1.14 */ | |
17 /* */ | |
18 /* COMPONENT */ | |
19 /* */ | |
20 /* PI - Pipe Management */ | |
21 /* */ | |
22 /* DESCRIPTION */ | |
23 /* */ | |
24 /* This file contains data structure definitions and constants for */ | |
25 /* the message Pipe component. */ | |
26 /* */ | |
27 /* DATA STRUCTURES */ | |
28 /* */ | |
29 /* PI_PCB Pipe control block */ | |
30 /* PI_SUSPEND Pipe suspension block */ | |
31 /* */ | |
32 /* FUNCTIONS */ | |
33 /* */ | |
34 /* None */ | |
35 /* */ | |
36 /* DEPENDENCIES */ | |
37 /* */ | |
38 /* cs_defs.h Common service definitions */ | |
39 /* tc_defs.h Thread Control definitions */ | |
40 /* */ | |
41 /* HISTORY */ | |
42 /* */ | |
43 /* DATE REMARKS */ | |
44 /* */ | |
45 /* 03-01-1993 Created initial version 1.0 */ | |
46 /* 04-19-1993 Verified version 1.0 */ | |
47 /* 03-01-1994 Moved include files outside of */ | |
48 /* the file #ifndef to allow the */ | |
49 /* use of actual data structures, */ | |
50 /* removed protection structure, */ | |
51 /* put padding into structure, */ | |
52 /* resulting in version 1.1 */ | |
53 /* */ | |
54 /* 03-18-1994 Verified version 1.1 */ | |
55 /* 04-17-1996 updated to version 1.2 */ | |
56 /* 03-24-1998 Released version 1.3. */ | |
57 /* 03-26-1999 Released 1.11m (new release */ | |
58 /* numbering scheme) */ | |
59 /* 04-17-2002 Released version 1.13m */ | |
60 /* 11-07-2002 Released version 1.14 */ | |
61 /*************************************************************************/ | |
62 | |
63 #include "cs_defs.h" /* Common service constants */ | |
64 #include "tc_defs.h" /* Thread control constants */ | |
65 | |
66 | |
67 /* Check to see if the file has been included already. */ | |
68 | |
69 #ifndef PI_DEFS | |
70 #define PI_DEFS | |
71 | |
72 | |
73 /* Define constants local to this component. */ | |
74 | |
75 #define PI_PIPE_ID 0x50495045UL | |
76 | |
77 | |
78 /* Define the Pipe Control Block data type. */ | |
79 | |
80 typedef struct PI_PCB_STRUCT | |
81 { | |
82 CS_NODE pi_created; /* Node for linking to */ | |
83 /* created pipe list */ | |
84 UNSIGNED pi_id; /* Internal PCB ID */ | |
85 CHAR pi_name[NU_MAX_NAME]; /* Pipe name */ | |
86 BOOLEAN pi_fixed_size; /* Fixed-size messages? */ | |
87 BOOLEAN pi_fifo_suspend; /* Suspension type flag */ | |
88 #if PAD_2 | |
89 DATA_ELEMENT pi_padding[PAD_2]; | |
90 #endif | |
91 UNSIGNED pi_pipe_size; /* Total size of pipe */ | |
92 UNSIGNED pi_messages; /* Messages in pipe */ | |
93 UNSIGNED pi_message_size; /* Size of each message */ | |
94 UNSIGNED pi_available; /* Available bytes */ | |
95 BYTE_PTR pi_start; /* Start of pipe area */ | |
96 BYTE_PTR pi_end; /* End of pipe area + 1 */ | |
97 BYTE_PTR pi_read; /* Read pointer */ | |
98 BYTE_PTR pi_write; /* Write pointer */ | |
99 UNSIGNED pi_tasks_waiting; /* Number of waiting tasks*/ | |
100 struct PI_SUSPEND_STRUCT | |
101 *pi_urgent_list; /* Urgent message suspend */ | |
102 struct PI_SUSPEND_STRUCT | |
103 *pi_suspension_list; /* Suspension list */ | |
104 } PI_PCB; | |
105 | |
106 | |
107 /* Define the Pipe suspension structure. This structure is allocated off of | |
108 the caller's stack. */ | |
109 | |
110 typedef struct PI_SUSPEND_STRUCT | |
111 { | |
112 CS_NODE pi_suspend_link; /* Link to suspend blocks */ | |
113 PI_PCB *pi_pipe; /* Pointer to the pipe */ | |
114 TC_TCB *pi_suspended_task; /* Task suspended */ | |
115 BYTE_PTR pi_message_area; /* Pointer to message area*/ | |
116 UNSIGNED pi_message_size; /* Message size requested */ | |
117 UNSIGNED pi_actual_size; /* Actual size of message */ | |
118 STATUS pi_return_status; /* Return status */ | |
119 } PI_SUSPEND; | |
120 | |
121 #endif | |
122 | |
123 | |
124 | |
125 | |
126 |