1 | /* Screen1 |
---|
2 | * |
---|
3 | * This routine generates error screen 1 for test 9. |
---|
4 | * |
---|
5 | * Input parameters: NONE |
---|
6 | * |
---|
7 | * Output parameters: NONE |
---|
8 | * |
---|
9 | * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. |
---|
10 | * On-Line Applications Research Corporation (OAR). |
---|
11 | * All rights assigned to U.S. Government, 1994. |
---|
12 | * |
---|
13 | * This material may be reproduced by or for the U.S. Government pursuant |
---|
14 | * to the copyright license under the clause at DFARS 252.227-7013. This |
---|
15 | * notice must appear in all copies of this file and its derivatives. |
---|
16 | * |
---|
17 | * $Id$ |
---|
18 | */ |
---|
19 | |
---|
20 | #include "system.h" |
---|
21 | |
---|
22 | void Screen1() |
---|
23 | { |
---|
24 | rtems_unsigned32 notepad_value; |
---|
25 | rtems_id self_id; |
---|
26 | rtems_task_priority previous_priority; |
---|
27 | rtems_status_code status; |
---|
28 | |
---|
29 | status = rtems_task_delete( 100 ); |
---|
30 | fatal_directive_status( |
---|
31 | status, |
---|
32 | RTEMS_INVALID_ID, |
---|
33 | "rtems_task_delete with illegal id" |
---|
34 | ); |
---|
35 | puts( "TA1 - rtems_task_delete - RTEMS_INVALID_ID" ); |
---|
36 | |
---|
37 | status = rtems_task_get_note( RTEMS_SELF, 100, ¬epad_value ); |
---|
38 | fatal_directive_status( |
---|
39 | status, |
---|
40 | RTEMS_INVALID_NUMBER, |
---|
41 | "rtems_task_get_note with illegal notepad" |
---|
42 | ); |
---|
43 | puts( "TA1 - rtems_task_get_note - RTEMS_INVALID_NUMBER" ); |
---|
44 | |
---|
45 | status = rtems_task_get_note( 100, RTEMS_NOTEPAD_LAST, ¬epad_value ); |
---|
46 | fatal_directive_status( |
---|
47 | status, |
---|
48 | RTEMS_INVALID_ID, |
---|
49 | "rtems_task_get_note with illegal id" |
---|
50 | ); |
---|
51 | puts( "TA1 - rtems_task_get_note - RTEMS_INVALID_ID" ); |
---|
52 | |
---|
53 | status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &self_id ); |
---|
54 | directive_failed( status, "rtems_task_ident of self" ); |
---|
55 | |
---|
56 | if ( self_id != Task_id[ 1 ] ) { |
---|
57 | puts( "ERROR - rtems_task_ident - incorrect ID returned!" ); |
---|
58 | } |
---|
59 | puts( "TA1 - rtems_task_ident - current task RTEMS_SUCCESSFUL" ); |
---|
60 | |
---|
61 | status = rtems_task_ident( 100, RTEMS_SEARCH_ALL_NODES, &Junk_id ); |
---|
62 | fatal_directive_status( |
---|
63 | status, |
---|
64 | RTEMS_INVALID_NAME, |
---|
65 | "rtems_task_ident with illegal name (local)" |
---|
66 | ); |
---|
67 | puts( "TA1 - rtems_task_ident - global RTEMS_INVALID_NAME" ); |
---|
68 | |
---|
69 | status = rtems_task_ident( 100, 1, &Junk_id ); |
---|
70 | fatal_directive_status( |
---|
71 | status, |
---|
72 | RTEMS_INVALID_NAME, |
---|
73 | "rtems_task_ident with illegal name (global)" |
---|
74 | ); |
---|
75 | puts( "TA1 - rtems_task_ident - local RTEMS_INVALID_NAME" ); |
---|
76 | |
---|
77 | status = rtems_task_ident( 100, 2, &Junk_id ); |
---|
78 | fatal_directive_status( |
---|
79 | status, |
---|
80 | RTEMS_INVALID_NODE, |
---|
81 | "rtems_task_ident with illegal node" |
---|
82 | ); |
---|
83 | puts( "TA1 - rtems_task_ident - RTEMS_INVALID_NODE" ); |
---|
84 | |
---|
85 | status = rtems_task_restart( 100, 0 ); |
---|
86 | fatal_directive_status( |
---|
87 | status, |
---|
88 | RTEMS_INVALID_ID, |
---|
89 | "rtems_task_restart with illegal id" |
---|
90 | ); |
---|
91 | puts( "TA1 - rtems_task_restart - RTEMS_INVALID_ID" ); |
---|
92 | |
---|
93 | status = rtems_task_resume( 100 ); |
---|
94 | fatal_directive_status( |
---|
95 | status, |
---|
96 | RTEMS_INVALID_ID, |
---|
97 | "rtems_task_resume with illegal id" |
---|
98 | ); |
---|
99 | puts( "TA1 - rtems_task_resume - RTEMS_INVALID_ID" ); |
---|
100 | |
---|
101 | status = rtems_task_resume( RTEMS_SELF ); |
---|
102 | fatal_directive_status( |
---|
103 | status, |
---|
104 | RTEMS_INCORRECT_STATE, |
---|
105 | "rtems_task_resume of ready task" |
---|
106 | ); |
---|
107 | puts( "TA1 - rtems_task_resume - RTEMS_INCORRECT_STATE" ); |
---|
108 | |
---|
109 | status = rtems_task_set_priority( RTEMS_SELF, 512, &previous_priority ); |
---|
110 | fatal_directive_status( |
---|
111 | status, |
---|
112 | RTEMS_INVALID_PRIORITY, |
---|
113 | "rtems_task_set_priority with illegal priority" |
---|
114 | ); |
---|
115 | puts( "TA1 - rtems_task_set_priority - RTEMS_INVALID_PRIORITY" ); |
---|
116 | |
---|
117 | status = rtems_task_set_priority( 100, 8, &previous_priority ); |
---|
118 | fatal_directive_status( |
---|
119 | status, |
---|
120 | RTEMS_INVALID_ID, |
---|
121 | "rtems_task_set_priority with illegal id" |
---|
122 | ); |
---|
123 | puts( "TA1 - rtems_task_set_priority - RTEMS_INVALID_ID" ); |
---|
124 | |
---|
125 | status = rtems_task_set_note( |
---|
126 | RTEMS_SELF, |
---|
127 | RTEMS_NOTEPAD_LAST+10, |
---|
128 | notepad_value |
---|
129 | ); |
---|
130 | fatal_directive_status( |
---|
131 | status, |
---|
132 | RTEMS_INVALID_NUMBER, |
---|
133 | "rtems_task_set_note with illegal notepad" |
---|
134 | ); |
---|
135 | puts( "TA1 - rtems_task_set_note - RTEMS_INVALID_NUMBER" ); |
---|
136 | |
---|
137 | status = rtems_task_set_note( 100, RTEMS_NOTEPAD_LAST, notepad_value ); |
---|
138 | fatal_directive_status( |
---|
139 | status, |
---|
140 | RTEMS_INVALID_ID, |
---|
141 | "rtems_task_set_note with illegal id" |
---|
142 | ); |
---|
143 | puts( "TA1 - rtems_task_set_note - RTEMS_INVALID_ID" ); |
---|
144 | |
---|
145 | status = rtems_task_start( 100, Task_1, 0 ); |
---|
146 | fatal_directive_status( |
---|
147 | status, |
---|
148 | RTEMS_INVALID_ID, |
---|
149 | "rtems_task_start with illegal id" |
---|
150 | ); |
---|
151 | puts( "TA1 - rtems_task_start - RTEMS_INVALID_ID" ); |
---|
152 | |
---|
153 | status = rtems_task_start( 0, Task_1, 0 ); |
---|
154 | fatal_directive_status( |
---|
155 | status, |
---|
156 | RTEMS_INCORRECT_STATE, |
---|
157 | "rtems_task_start of ready task" |
---|
158 | ); |
---|
159 | puts( "TA1 - rtems_task_start - RTEMS_INCORRECT_STATE" ); |
---|
160 | |
---|
161 | status = rtems_task_suspend( 100 ); |
---|
162 | fatal_directive_status( |
---|
163 | status, |
---|
164 | RTEMS_INVALID_ID, |
---|
165 | "rtems_task_suspend with illegal id" |
---|
166 | ); |
---|
167 | puts( "TA1 - rtems_task_suspend - RTEMS_INVALID_ID" ); |
---|
168 | } |
---|