FreeCalypso > hg > tcs211-c139
comparison gpf/INC/NUC/pi_defs.h @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
1 /*************************************************************************/ | |
2 /* */ | |
3 /* Copyright (c) 1993-1996 Accelerated Technology, Inc. */ | |
4 /* */ | |
5 /* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */ | |
6 /* subject matter of this material. All manufacturing, reproduction, */ | |
7 /* use, and sales rights pertaining to this subject matter are governed */ | |
8 /* by the license agreement. The recipient of this software implicitly */ | |
9 /* accepts the terms of the license. */ | |
10 /* */ | |
11 /*************************************************************************/ | |
12 | |
13 /*************************************************************************/ | |
14 /* */ | |
15 /* FILE NAME VERSION */ | |
16 /* */ | |
17 /* pi_defs.h PLUS 1.2 */ | |
18 /* */ | |
19 /* COMPONENT */ | |
20 /* */ | |
21 /* PI - Pipe Management */ | |
22 /* */ | |
23 /* DESCRIPTION */ | |
24 /* */ | |
25 /* This file contains data structure definitions and constants for */ | |
26 /* the message Pipe component. */ | |
27 /* */ | |
28 /* AUTHOR */ | |
29 /* */ | |
30 /* William E. Lamie, Accelerated Technology, Inc. */ | |
31 /* */ | |
32 /* DATA STRUCTURES */ | |
33 /* */ | |
34 /* PI_PCB Pipe control block */ | |
35 /* PI_SUSPEND Pipe suspension block */ | |
36 /* */ | |
37 /* FUNCTIONS */ | |
38 /* */ | |
39 /* None */ | |
40 /* */ | |
41 /* DEPENDENCIES */ | |
42 /* */ | |
43 /* cs_defs.h Common service definitions */ | |
44 /* tc_defs.h Thread Control definitions */ | |
45 /* */ | |
46 /* HISTORY */ | |
47 /* */ | |
48 /* NAME DATE REMARKS */ | |
49 /* */ | |
50 /* W. Lamie 03-01-1993 Created initial version 1.0 */ | |
51 /* D. Lamie 04-19-1993 Verified version 1.0 */ | |
52 /* W. Lamie 03-01-1994 Moved include files outside of */ | |
53 /* the file #ifndef to allow the */ | |
54 /* use of actual data structures, */ | |
55 /* removed protection structure, */ | |
56 /* put padding into structure, */ | |
57 /* resulting in version 1.1 */ | |
58 /* R. Pfaff - */ | |
59 /* D. Lamie 03-18-1994 Verified version 1.1 */ | |
60 /* M.Q. Qian 04-17-1996 updated to version 1.2 */ | |
61 /* */ | |
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 PI_DEFS | |
71 #define PI_DEFS | |
72 | |
73 | |
74 /* Define constants local to this component. */ | |
75 | |
76 #define PI_PIPE_ID 0x50495045UL | |
77 | |
78 | |
79 /* Define the Pipe Control Block data type. */ | |
80 | |
81 typedef struct PI_PCB_STRUCT | |
82 { | |
83 CS_NODE pi_created; /* Node for linking to */ | |
84 /* created pipe list */ | |
85 UNSIGNED pi_id; /* Internal PCB ID */ | |
86 CHAR pi_name[NU_MAX_NAME]; /* Pipe name */ | |
87 DATA_ELEMENT pi_fixed_size; /* Fixed-size messages? */ | |
88 DATA_ELEMENT pi_fifo_suspend; /* Suspension type flag */ | |
89 #if PAD_2 | |
90 DATA_ELEMENT pi_padding[PAD_2]; | |
91 #endif | |
92 UNSIGNED pi_pipe_size; /* Total size of pipe */ | |
93 UNSIGNED pi_messages; /* Messages in pipe */ | |
94 UNSIGNED pi_message_size; /* Size of each message */ | |
95 UNSIGNED pi_available; /* Available bytes */ | |
96 BYTE_PTR pi_start; /* Start of pipe area */ | |
97 BYTE_PTR pi_end; /* End of pipe area + 1 */ | |
98 BYTE_PTR pi_read; /* Read pointer */ | |
99 BYTE_PTR pi_write; /* Write pointer */ | |
100 UNSIGNED pi_tasks_waiting; /* Number of waiting tasks*/ | |
101 struct PI_SUSPEND_STRUCT | |
102 *pi_urgent_list; /* Urgent message suspend */ | |
103 struct PI_SUSPEND_STRUCT | |
104 *pi_suspension_list; /* Suspension list */ | |
105 } PI_PCB; | |
106 | |
107 | |
108 /* Define the Pipe suspension structure. This structure is allocated off of | |
109 the caller's stack. */ | |
110 | |
111 typedef struct PI_SUSPEND_STRUCT | |
112 { | |
113 CS_NODE pi_suspend_link; /* Link to suspend blocks */ | |
114 PI_PCB *pi_pipe; /* Pointer to the pipe */ | |
115 TC_TCB *pi_suspended_task; /* Task suspended */ | |
116 BYTE_PTR pi_message_area; /* Pointer to message area*/ | |
117 UNSIGNED pi_message_size; /* Message size requested */ | |
118 UNSIGNED pi_actual_size; /* Actual size of message */ | |
119 STATUS pi_return_status; /* Return status */ | |
120 } PI_SUSPEND; | |
121 | |
122 #endif |