FreeCalypso > hg > tcs211-c139
comparison gpf/INC/NUC/mb_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 /* mb_defs.h PLUS 1.2 */ | |
18 /* */ | |
19 /* COMPONENT */ | |
20 /* */ | |
21 /* MB - Mailbox Management */ | |
22 /* */ | |
23 /* DESCRIPTION */ | |
24 /* */ | |
25 /* This file contains data structure definitions and constants for */ | |
26 /* the message Mailbox component. */ | |
27 /* */ | |
28 /* AUTHOR */ | |
29 /* */ | |
30 /* William E. Lamie, Accelerated Technology, Inc. */ | |
31 /* */ | |
32 /* DATA STRUCTURES */ | |
33 /* */ | |
34 /* MB_MCB Mailbox control block */ | |
35 /* MB_SUSPEND Mailbox 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 /* inside of each mailbox, added */ | |
57 /* padding logic, resulting in */ | |
58 /* version 1.1 */ | |
59 /* R. Pfaff - */ | |
60 /* D. Lamie 03-18-1994 Verified version 1.1 */ | |
61 /* M.Q. Qian 04-17-1996 updated to version 1.2 */ | |
62 /* */ | |
63 /*************************************************************************/ | |
64 | |
65 #include "cs_defs.h" /* Common service constants */ | |
66 #include "tc_defs.h" /* Thread control constants */ | |
67 | |
68 | |
69 /* Check to see if the file has been included already. */ | |
70 | |
71 #ifndef MB_DEFS | |
72 #define MB_DEFS | |
73 | |
74 | |
75 /* Define constants local to this component. */ | |
76 | |
77 #define MB_MAILBOX_ID 0x4d424f58UL | |
78 #define MB_MESSAGE_SIZE 4 | |
79 | |
80 | |
81 /* Define the Mailbox Control Block data type. */ | |
82 | |
83 typedef struct MB_MCB_STRUCT | |
84 { | |
85 CS_NODE mb_created; /* Node for linking to */ | |
86 /* created mailbox list */ | |
87 UNSIGNED mb_id; /* Internal MCB ID */ | |
88 CHAR mb_name[NU_MAX_NAME]; /* Mailbox name */ | |
89 DATA_ELEMENT mb_message_present; /* Message present flag */ | |
90 DATA_ELEMENT mb_fifo_suspend; /* Suspension type flag */ | |
91 #if PAD_2 | |
92 DATA_ELEMENT mb_padding[PAD_2]; | |
93 #endif | |
94 UNSIGNED mb_tasks_waiting; /* Number of waiting tasks*/ | |
95 UNSIGNED /* Message area */ | |
96 mb_message_area[MB_MESSAGE_SIZE]; | |
97 struct MB_SUSPEND_STRUCT | |
98 *mb_suspension_list; /* Suspension list */ | |
99 } MB_MCB; | |
100 | |
101 | |
102 /* Define the mailbox suspension structure. This structure is allocated off of | |
103 the caller's stack. */ | |
104 | |
105 typedef struct MB_SUSPEND_STRUCT | |
106 { | |
107 CS_NODE mb_suspend_link; /* Link to suspend blocks */ | |
108 MB_MCB *mb_mailbox; /* Pointer to the mailbox */ | |
109 TC_TCB *mb_suspended_task; /* Task suspended */ | |
110 UNSIGNED *mb_message_area; /* Pointer to message area*/ | |
111 STATUS mb_return_status; /* Return status */ | |
112 } MB_SUSPEND; | |
113 | |
114 #endif |