1 | -- |
---|
2 | -- MPTEST / SPECIFICATION |
---|
3 | -- |
---|
4 | -- DESCRIPTION: |
---|
5 | -- |
---|
6 | -- This package is the specification for Test 9 of the RTEMS |
---|
7 | -- Multiprocessor Test Suite. |
---|
8 | -- |
---|
9 | -- DEPENDENCIES: |
---|
10 | -- |
---|
11 | -- |
---|
12 | -- |
---|
13 | -- COPYRIGHT (c) 1989-2011. |
---|
14 | -- On-Line Applications Research Corporation (OAR). |
---|
15 | -- |
---|
16 | -- The license and distribution terms for this file may in |
---|
17 | -- the file LICENSE in this distribution or at |
---|
18 | -- http://www.rtems.com/license/LICENSE. |
---|
19 | -- |
---|
20 | |
---|
21 | with RTEMS; |
---|
22 | with RTEMS.TASKS; |
---|
23 | |
---|
24 | package MPTEST is |
---|
25 | |
---|
26 | -- |
---|
27 | -- These arrays contain the IDs and NAMEs of all RTEMS tasks created |
---|
28 | -- by this test. |
---|
29 | -- |
---|
30 | |
---|
31 | TASK_ID : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.ID; |
---|
32 | TASK_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 3 ) of RTEMS.NAME; |
---|
33 | |
---|
34 | -- |
---|
35 | -- These arrays contain the IDs and NAMEs of all RTEMS message |
---|
36 | -- queues created by this test. |
---|
37 | -- |
---|
38 | |
---|
39 | QUEUE_ID : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.ID; |
---|
40 | QUEUE_NAME : array ( RTEMS.UNSIGNED32 range 1 .. 2 ) of RTEMS.NAME; |
---|
41 | |
---|
42 | -- |
---|
43 | -- The following are message buffers used to contain the test messages |
---|
44 | -- and pointers to those buffers. |
---|
45 | -- |
---|
46 | |
---|
47 | RECEIVE_BUFFER_AREA : RTEMS.BUFFER; |
---|
48 | BUFFER_AREA_1 : RTEMS.BUFFER; |
---|
49 | BUFFER_AREA_2 : RTEMS.BUFFER; |
---|
50 | BUFFER_AREA_3 : RTEMS.BUFFER; |
---|
51 | BUFFER_AREA_4 : RTEMS.BUFFER; |
---|
52 | |
---|
53 | RECEIVE_BUFFER : RTEMS.BUFFER_POINTER; |
---|
54 | BUFFER_1 : RTEMS.BUFFER_POINTER; |
---|
55 | BUFFER_2 : RTEMS.BUFFER_POINTER; |
---|
56 | BUFFER_3 : RTEMS.BUFFER_POINTER; |
---|
57 | BUFFER_4 : RTEMS.BUFFER_POINTER; |
---|
58 | |
---|
59 | -- |
---|
60 | -- This variable contains the ID of the remote task with which this |
---|
61 | -- test interacts. |
---|
62 | -- |
---|
63 | |
---|
64 | REMOTE_TID : RTEMS.ID; |
---|
65 | |
---|
66 | -- |
---|
67 | -- This variable contains the node on which the remote task with which |
---|
68 | -- this test interacts resides. |
---|
69 | -- |
---|
70 | |
---|
71 | REMOTE_NODE : RTEMS.UNSIGNED32; |
---|
72 | |
---|
73 | -- |
---|
74 | -- The number of events to process per dot printed out. |
---|
75 | -- |
---|
76 | |
---|
77 | PER_DOT : constant RTEMS.UNSIGNED32 := 100; |
---|
78 | |
---|
79 | -- |
---|
80 | -- INIT |
---|
81 | -- |
---|
82 | -- DESCRIPTION: |
---|
83 | -- |
---|
84 | -- This RTEMS task initializes the application. |
---|
85 | -- |
---|
86 | |
---|
87 | procedure INIT ( |
---|
88 | ARGUMENT : in RTEMS.TASKS.ARGUMENT |
---|
89 | ); |
---|
90 | pragma Convention (C, INIT); |
---|
91 | |
---|
92 | -- |
---|
93 | -- SEND_MESSAGES |
---|
94 | -- |
---|
95 | -- This subprogram prints and sends a sequence of three test messages. |
---|
96 | -- One of the messages is sent, one is urgent, and one is broadcast. |
---|
97 | -- A one second pause is between each the sending of each message. |
---|
98 | -- |
---|
99 | |
---|
100 | procedure SEND_MESSAGES; |
---|
101 | |
---|
102 | -- |
---|
103 | -- RECEIVE_MESSAGES |
---|
104 | -- |
---|
105 | -- This subprogram receives and prints a sequence of three test messages. |
---|
106 | -- |
---|
107 | |
---|
108 | procedure RECEIVE_MESSAGES; |
---|
109 | |
---|
110 | -- |
---|
111 | -- FILL_BUFFER |
---|
112 | -- |
---|
113 | -- DESCRIPTION: |
---|
114 | -- |
---|
115 | -- This subprogram takes the SOURCE input string and places |
---|
116 | -- up to the first sixteen characters of that string into |
---|
117 | -- the message BUFFER. |
---|
118 | -- |
---|
119 | |
---|
120 | procedure FILL_BUFFER ( |
---|
121 | SOURCE : in STRING; |
---|
122 | BUFFER : out RTEMS.BUFFER |
---|
123 | ); |
---|
124 | |
---|
125 | -- |
---|
126 | -- PUT_BUFFER |
---|
127 | -- |
---|
128 | -- DESCRIPTION: |
---|
129 | -- |
---|
130 | -- This subprogram prints the specified message BUFFER. |
---|
131 | -- |
---|
132 | |
---|
133 | procedure PUT_BUFFER ( |
---|
134 | BUFFER : in RTEMS.BUFFER |
---|
135 | ); |
---|
136 | |
---|
137 | -- |
---|
138 | -- TEST_TASK |
---|
139 | -- |
---|
140 | -- DESCRIPTION: |
---|
141 | -- |
---|
142 | -- This is the body of the RTEMS tasks which constitute this test. |
---|
143 | -- |
---|
144 | |
---|
145 | procedure TEST_TASK ( |
---|
146 | ARGUMENT : in RTEMS.TASKS.ARGUMENT |
---|
147 | ); |
---|
148 | pragma Convention (C, TEST_TASK); |
---|
149 | |
---|
150 | end MPTEST; |
---|