comparison src/nucleus/mb_defs.h @ 7:0f80e1e4dce4

src/nucleus: library C code import from FreeNucleus package
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 15 Jul 2018 20:57:33 +0000
parents
children
comparison
equal deleted inserted replaced
6:8b2a9a374324 7:0f80e1e4dce4
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 /* mb_defs.h Nucleus PLUS 1.14 */
17 /* */
18 /* COMPONENT */
19 /* */
20 /* MB - Mailbox Management */
21 /* */
22 /* DESCRIPTION */
23 /* */
24 /* This file contains data structure definitions and constants for */
25 /* the message Mailbox component. */
26 /* */
27 /* DATA STRUCTURES */
28 /* */
29 /* MB_MCB Mailbox control block */
30 /* MB_SUSPEND Mailbox 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 /* inside of each mailbox, added */
52 /* padding logic, resulting in */
53 /* 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 MB_DEFS
71 #define MB_DEFS
72
73
74 /* Define constants local to this component. */
75
76 #define MB_MAILBOX_ID 0x4d424f58UL
77 #define MB_MESSAGE_SIZE 4
78
79
80 /* Define the Mailbox Control Block data type. */
81
82 typedef struct MB_MCB_STRUCT
83 {
84 CS_NODE mb_created; /* Node for linking to */
85 /* created mailbox list */
86 UNSIGNED mb_id; /* Internal MCB ID */
87 CHAR mb_name[NU_MAX_NAME]; /* Mailbox name */
88 BOOLEAN mb_message_present; /* Message present flag */
89 BOOLEAN mb_fifo_suspend; /* Suspension type flag */
90 #if PAD_2
91 DATA_ELEMENT mb_padding[PAD_2];
92 #endif
93 UNSIGNED mb_tasks_waiting; /* Number of waiting tasks*/
94 UNSIGNED /* Message area */
95 mb_message_area[MB_MESSAGE_SIZE];
96 struct MB_SUSPEND_STRUCT
97 *mb_suspension_list; /* Suspension list */
98 } MB_MCB;
99
100
101 /* Define the mailbox suspension structure. This structure is allocated off of
102 the caller's stack. */
103
104 typedef struct MB_SUSPEND_STRUCT
105 {
106 CS_NODE mb_suspend_link; /* Link to suspend blocks */
107 MB_MCB *mb_mailbox; /* Pointer to the mailbox */
108 TC_TCB *mb_suspended_task; /* Task suspended */
109 UNSIGNED *mb_message_area; /* Pointer to message area*/
110 STATUS mb_return_status; /* Return status */
111 } MB_SUSPEND;
112
113 #endif
114
115
116
117
118