FreeCalypso > hg > tcs211-l1-reconst
comparison gpf/INC/NUC/qu_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 /* qu_defs.h PLUS 1.2 */ | |
18 /* */ | |
19 /* COMPONENT */ | |
20 /* */ | |
21 /* QU - Queue Management */ | |
22 /* */ | |
23 /* DESCRIPTION */ | |
24 /* */ | |
25 /* This file contains data structure definitions and constants for */ | |
26 /* the message Queue component. */ | |
27 /* */ | |
28 /* AUTHOR */ | |
29 /* */ | |
30 /* William E. Lamie, Accelerated Technology, Inc. */ | |
31 /* */ | |
32 /* DATA STRUCTURES */ | |
33 /* */ | |
34 /* QU_QCB Queue control block */ | |
35 /* QU_SUSPEND Queue 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 QU_DEFS | |
71 #define QU_DEFS | |
72 | |
73 | |
74 /* Define constants local to this component. */ | |
75 | |
76 #define QU_QUEUE_ID 0x51554555UL | |
77 | |
78 | |
79 /* Define the Queue Control Block data type. */ | |
80 | |
81 typedef struct QU_QCB_STRUCT | |
82 { | |
83 CS_NODE qu_created; /* Node for linking to */ | |
84 /* created queue list */ | |
85 UNSIGNED qu_id; /* Internal QCB ID */ | |
86 CHAR qu_name[NU_MAX_NAME]; /* Queue name */ | |
87 DATA_ELEMENT qu_fixed_size; /* Fixed-size messages? */ | |
88 DATA_ELEMENT qu_fifo_suspend; /* Suspension type flag */ | |
89 #if PAD_2 | |
90 DATA_ELEMENT qu_padding[PAD_2]; | |
91 #endif | |
92 UNSIGNED qu_queue_size; /* Total size of queue */ | |
93 UNSIGNED qu_messages; /* Messages in queue */ | |
94 UNSIGNED qu_message_size; /* Size of each message */ | |
95 UNSIGNED qu_available; /* Available words */ | |
96 UNSIGNED_PTR qu_start; /* Start of queue area */ | |
97 UNSIGNED_PTR qu_end; /* End of queue area + 1 */ | |
98 UNSIGNED_PTR qu_read; /* Read pointer */ | |
99 UNSIGNED_PTR qu_write; /* Write pointer */ | |
100 UNSIGNED qu_tasks_waiting; /* Number of waiting tasks*/ | |
101 struct QU_SUSPEND_STRUCT | |
102 *qu_urgent_list; /* Urgent message suspend */ | |
103 struct QU_SUSPEND_STRUCT | |
104 *qu_suspension_list; /* Suspension list */ | |
105 } QU_QCB; | |
106 | |
107 | |
108 /* Define the queue suspension structure. This structure is allocated off of | |
109 the caller's stack. */ | |
110 | |
111 typedef struct QU_SUSPEND_STRUCT | |
112 { | |
113 CS_NODE qu_suspend_link; /* Link to suspend blocks */ | |
114 QU_QCB *qu_queue; /* Pointer to the queue */ | |
115 TC_TCB *qu_suspended_task; /* Task suspended */ | |
116 UNSIGNED_PTR qu_message_area; /* Pointer to message area*/ | |
117 UNSIGNED qu_message_size; /* Message size requested */ | |
118 UNSIGNED qu_actual_size; /* Actual size of message */ | |
119 STATUS qu_return_status; /* Return status */ | |
120 } QU_SUSPEND; | |
121 | |
122 #endif |