source: rtems/testsuites/libtests/rtems++/Task1.cc @ d5154d0f

5
Last change on this file since d5154d0f was d5154d0f, checked in by Aun-Ali Zaidi <admin@…>, on Dec 23, 2015 at 8:44:02 PM

api: Remove deprecated Notepads

Notepads where a feature of RTEMS' tasks that simply functioned in
the same way as POSIX keys or threaded local storage (TLS). They were
introduced well before per task variables, which are also deprecated,
and were barely used in favor of their POSIX alternatives.

In addition to their scarce usage, Notepads took up unnecessary memory.
For each task:

  • 16 32-bit integers were allocated.
  • A total of 64 bytes per task per thread.

This is especially critical in low memory and safety-critical applications.

They are also defined as uint32_t, and therefore are not guaranteed to
hold a pointer.

Lastly, they are not portable solutions for SMP and uniprocessor systems,
like POSIX keys and TLS.

updates #2493.

  • Property mode set to 100644
File size: 19.8 KB
Line 
1/*  Task1
2 *
3 *  This task is the main line for the test. It creates other
4 *  tasks which can create
5 *
6 *  Input parameters:
7 *    argument - task argument
8 *
9 *  Output parameters:  NONE
10 *
11 *  COPYRIGHT (c) 1997
12 *  Objective Design Systems Ltd Pty (ODS)
13 *  All rights reserved (R) Objective Design Systems Ltd Pty
14 *
15 *  COPYRIGHT (c) 1989-2007.
16 *  On-Line Applications Research Corporation (OAR).
17 *
18 *  The license and distribution terms for this file may be
19 *  found in the file LICENSE in this distribution or at
20 *  http://www.rtems.org/license/LICENSE.
21 */
22
23#ifdef HAVE_CONFIG_H
24#include "config.h"
25#endif
26
27#include <stdlib.h>
28#include <string.h>
29#include "System.h"
30
31/* c.f. cpukit/score/include/rtems/score/priority.h */
32#define PRIiPriority_Control PRIi32
33/* rtems_task_priority is a typedef to Priority_Control */
34#define PRIirtems_task_priority PRIiPriority_Control
35
36/* c.f. cpukit/rtems/include/rtems/rtems/modes.h */
37#define PRIXModes_Control PRIX32
38#define PRIiModes_Control PRIi32
39/* rtems_mode is a typedef to Modes_Control */
40#define PRIXrtems_mode PRIXModes_Control
41#define PRIirtems_mode PRIiModes_Control
42
43/* c.f. cpukit/score/include/rtems/score/isr.h */
44#define PRIiISR_Level PRIi32
45/* rtems_interrupt_level is a typedef to ISR_Level */
46#define PRIirtems_interrupt_level PRIiISR_Level
47
48void Task1::body(rtems_task_argument argument)
49{
50  rtems_test_pause_and_screen_number(1);
51
52  printf(" START Task Class test\n");
53
54  printf("%s - test argument - ", name_string());
55  if (argument != 0xDEADDEAD)
56    printf("argument is not 0xDEADDEAD\n");
57  else
58    printf("argument matched\n");
59
60  screen1();
61  rtems_test_pause_and_screen_number(2);
62
63  screen2();
64  rtems_test_pause_and_screen_number(3);
65
66  screen3();
67  rtems_test_pause_and_screen_number(4);
68
69  screen4();
70  rtems_test_pause_and_screen_number(5);
71
72  screen5();
73  rtems_test_pause_and_screen_number(6);
74
75  screen6();
76
77  // do not call exit(0) from this thread as this object is static
78  // the static destructor call delete the task which is calling exit
79  // so exit never completes
80
81  EndTask end_task("ENDT", (rtems_task_priority) 1, RTEMS_MINIMUM_STACK_SIZE * 6);
82  end_task.start(0);
83
84  rtemsEvent block_me;
85  rtems_event_set out;
86
87  block_me.receive(RTEMS_SIGNAL_0, out);
88
89  printf("**** TASK 1 did not block ????\n");
90}
91
92void Task1::screen1(void)
93{
94  // create two local task objects to connect to this task
95  rtemsTask local_task_1 = *this;
96  rtemsTask local_task_2;
97
98  local_task_2 = *this;
99
100  // check the copy constructor works
101  printf("%s - copy constructor - ", name_string());
102  if (local_task_1.id_is() == id_is())
103    printf("local and this id's match\n");
104  else
105    printf("local and this id's do not match\n");
106
107  printf("%s - copy constructor - ", name_string());
108  if (local_task_1.name_is() == name_is())
109    printf("local and this name's match\n");
110  else
111    printf("local and this name's do not match\n");
112
113  // check the copy operator works
114  printf("%s - copy operator - ", name_string());
115  if (local_task_2.id_is() == id_is())
116    printf("local and this id's match\n");
117  else
118    printf("local and this id's do not match\n");
119  printf("%s - copy operator - ", name_string());
120  if (local_task_2.name_is() == name_is())
121    printf("local and this name's match\n");
122  else
123    printf("local and this name's do not match\n");
124
125  // check that the owner of the id cannot delete this task
126  printf("%s - not owner destroy's task - ", local_task_1.name_string());
127  local_task_1.destroy();
128  printf("%s\n", local_task_1.last_status_string());
129
130  // connect to a valid task
131  printf("%s - connect to a local valid task name - ", local_task_2.name_string());
132  local_task_2.connect("TA1 ", RTEMS_SEARCH_ALL_NODES);
133  printf("%s\n", local_task_2.last_status_string());
134
135  // connect to an invalid task
136  printf("%s - connect to an invalid task name - ", local_task_2.name_string());
137  local_task_2.connect("BADT", RTEMS_SEARCH_ALL_NODES);
138  printf("%s\n", local_task_2.last_status_string());
139
140  // connect to a task an invalid node
141  printf("%s - connect to a task on an invalid node - ", local_task_2.name_string());
142  local_task_2.connect("BADT", 10);
143  printf("%s\n", local_task_2.last_status_string());
144
145  // restart this task
146  printf("%s - restart from a non-owner - ", name_string());
147  local_task_1.restart(0);
148  printf("%s\n", local_task_1.last_status_string());
149}
150
151void Task1::screen2(void)
152{
153  // wake after using this object
154
155  printf("%s - wake after 0 secs - ", name_string());
156  wake_after(0);
157  printf("%s\n", last_status_string());
158
159  printf("%s - wake after 500 msecs - ", name_string());
160  wake_after(500000);
161  printf("%s\n", last_status_string());
162
163  printf("%s - wake after 5 secs - ", name_string());
164  wake_after(5000000);
165  printf("%s\n", last_status_string());
166
167  printf("%s - wake when - to do\n", name_string());
168
169  rtemsTask task_1 = *this;
170
171  // wake after using a connected object
172
173  printf("%s - connected object wake after 0 secs - ", task_1.name_string());
174  task_1.wake_after(0);
175  printf("%s\n", task_1.last_status_string());
176
177  printf("%s - connected object wake after 500 msecs - ", task_1.name_string());
178  task_1.wake_after(500000);
179  printf("%s\n", task_1.last_status_string());
180
181  printf("%s - connected object wake after 5 secs - ", task_1.name_string());
182  task_1.wake_after(5000000);
183  printf("%s\n", task_1.last_status_string());
184
185  printf("%s - connected object wake when - to do\n", task_1.name_string());
186
187  rtemsTask task_2;
188
189  // wake after using a self object
190
191  printf("%s - self object wake after 0 secs - ", task_2.name_string());
192  task_2.wake_after(0);
193  printf("%s\n", task_2.last_status_string());
194
195  printf("%s - self object wake after 500 msecs - ", task_2.name_string());
196  task_2.wake_after(500000);
197  printf("%s\n", task_2.last_status_string());
198
199  printf("%s - self object wake after 5 secs - ", task_2.name_string());
200  task_2.wake_after(5000000);
201  printf("%s\n", task_2.last_status_string());
202
203  printf("%s - self object wake when - to do\n", task_2.name_string());
204
205  rtems_task_priority current_priority;
206  rtems_task_priority priority;
207
208  // priorities with this object
209
210  printf("%s - get priority - ", name_string());
211  get_priority(current_priority);
212  printf("%s, priority is %" PRIirtems_task_priority "\n", last_status_string(), current_priority);
213
214  printf("%s - set priority to 512 - ", name_string());
215  set_priority(512);
216  printf("%s\n", last_status_string());
217
218  printf("%s - set priority to 25 - ", name_string());
219  set_priority(25);
220  printf("%s\n", last_status_string());
221
222  printf("%s - set priority to original - ", name_string());
223  set_priority(current_priority, priority);
224  printf("%s, priority was %" PRIirtems_task_priority "\n", last_status_string(), priority);
225
226  // priorities with connected object
227
228  printf("%s - connected object get priority - ", task_1.name_string());
229  task_1.get_priority(current_priority);
230  printf("%s, priority is %" PRIirtems_task_priority "\n", task_1.last_status_string(), current_priority);
231
232  printf("%s - connected object set priority to 512 - ", task_1.name_string());
233  task_1.set_priority(512);
234  printf("%s\n", task_1.last_status_string());
235
236  printf("%s - connected object set priority to 25 - ", task_1.name_string());
237  task_1.set_priority(25);
238  printf("%s\n", task_1.last_status_string());
239
240  printf("%s - connected object set priority to original - ", task_1.name_string());
241  task_1.set_priority(current_priority, priority);
242  printf("%s, priority was %" PRIirtems_task_priority "\n", task_1.last_status_string(), priority);
243
244  // priorities with self object
245
246  printf("%s - self object get priority - ", task_2.name_string());
247  task_2.get_priority(current_priority);
248  printf("%s, priority is %" PRIirtems_task_priority "\n", task_2.last_status_string(), current_priority);
249
250  printf("%s - self object set priority to 512 - ", task_2.name_string());
251  task_2.set_priority(512);
252  printf("%s\n", task_2.last_status_string());
253
254  printf("%s - self object set priority to 25 - ", task_2.name_string());
255  task_2.set_priority(25);
256  printf("%s\n", task_2.last_status_string());
257
258  printf("%s - self object set priority to original - ", task_2.name_string());
259  task_2.set_priority(current_priority, priority);
260  printf("%s, priority was %" PRIirtems_task_priority "\n", task_2.last_status_string(), priority);
261
262  printf(" END Task Class test\n");
263}
264
265#define RTEMS_ALL_MODES (RTEMS_PREEMPT_MASK | \
266                         RTEMS_TIMESLICE_MASK | \
267                         RTEMS_ASR_MASK | \
268                         RTEMS_INTERRUPT_MASK)
269
270void Task1::screen3(void)
271{
272  printf(" START TaskMode Class test\n");
273
274  rtemsTask self;
275  rtemsTaskMode task_mode;
276  rtems_mode current_mode;
277  rtems_mode mode;
278
279  printf("%s - get mode - ", self.name_string());
280  task_mode.get_mode(current_mode);
281  printf("%s,\n\t mode is 0x%08" PRIXrtems_mode ", ", task_mode.last_status_string(), current_mode);
282  print_mode(current_mode, RTEMS_ALL_MODES);
283  printf("\n");
284
285  // PREEMPTION mode control
286
287  printf("%s - get preemption state - ", self.name_string());
288  task_mode.get_preemption_state(mode);
289  printf("%s,\n\t mode is 0x%08" PRIXrtems_mode ", ", task_mode.last_status_string(), mode);
290  print_mode(mode, RTEMS_PREEMPT_MASK);
291  printf("\n");
292
293  printf("%s - set preemption state to RTEMS_PREEMPT - ", self.name_string());
294  task_mode.set_preemption_state(RTEMS_PREEMPT);
295  task_mode.get_mode(mode);
296  printf("%s,\n\t mode is 0x%08" PRIXrtems_mode ", ", task_mode.last_status_string(), mode);
297  print_mode(mode, RTEMS_ALL_MODES);
298  printf("\n");
299
300  printf("%s - set preemption state to RTEMS_NO_PREEMPT - ", self.name_string());
301  task_mode.set_preemption_state(RTEMS_NO_PREEMPT);
302  task_mode.get_mode(mode);
303  printf("%s,\n\t mode is 0x%08" PRIXrtems_mode ", ", task_mode.last_status_string(), mode);
304  print_mode(mode, RTEMS_ALL_MODES);
305  printf("\n");
306
307  // TIMESLICE mode control
308
309  printf("%s - get timeslice state - ", self.name_string());
310  task_mode.get_timeslice_state(mode);
311  printf("%s,\n\t mode is 0x%08" PRIXrtems_mode ", ", task_mode.last_status_string(), mode);
312  print_mode(mode, RTEMS_TIMESLICE_MASK);
313  printf("\n");
314
315  printf("%s - set timeslice state to RTEMS_TIMESLICE - ", self.name_string());
316  task_mode.set_timeslice_state(RTEMS_TIMESLICE);
317  task_mode.get_mode(mode);
318  printf("%s,\n\t mode is 0x%08" PRIXrtems_mode ", ", task_mode.last_status_string(), mode);
319  print_mode(mode, RTEMS_ALL_MODES);
320  printf("\n");
321
322  printf("%s - set timeslice state to RTEMS_NO_TIMESLICE - ", self.name_string());
323  task_mode.set_timeslice_state(RTEMS_NO_TIMESLICE);
324  task_mode.get_mode(mode);
325  printf("%s,\n\t mode is 0x%08" PRIXrtems_mode ", ", task_mode.last_status_string(), mode);
326  print_mode(mode, RTEMS_ALL_MODES);
327  printf("\n");
328
329  // ASR mode control
330
331  printf("%s - get asr state - ", self.name_string());
332  task_mode.get_asr_state(mode);
333  printf("%s,\n\t mode is 0x%08" PRIXrtems_mode ", ", task_mode.last_status_string(), mode);
334  print_mode(mode, RTEMS_ASR_MASK);
335  printf("\n");
336
337  printf("%s - set asr state to RTEMS_ASR - ", self.name_string());
338  task_mode.set_asr_state(RTEMS_ASR);
339  task_mode.get_mode(mode);
340  printf("%s,\n\t mode is 0x%08" PRIXrtems_mode ", ", task_mode.last_status_string(), mode);
341  print_mode(mode, RTEMS_ALL_MODES);
342  printf("\n");
343
344  printf("%s - set asr state to RTEMS_NO_ASR - ", self.name_string());
345  task_mode.set_asr_state(RTEMS_NO_ASR);
346  task_mode.get_mode(mode);
347  printf("%s,\n\t mode is 0x%08" PRIXrtems_mode ", ", task_mode.last_status_string(), mode);
348  print_mode(mode, RTEMS_ALL_MODES);
349  printf("\n");
350
351  // interrupt level control
352
353  rtems_interrupt_level current_level;
354  rtems_interrupt_level level;
355
356  printf("%s - get current interrupt level - ", self.name_string());
357  task_mode.get_interrupt_level(current_level);
358  printf("%s, level is %" PRIirtems_interrupt_level "\n", task_mode.last_status_string(), current_level);
359
360  printf("%s - set interrupt level to 102 - ", self.name_string());
361  task_mode.set_interrupt_level(102);
362  printf("%s\n", task_mode.last_status_string());
363
364  printf("%s - set interrupt level to original level - ", self.name_string());
365  task_mode.set_interrupt_level(current_level, level);
366  printf("%s, level was %" PRIirtems_interrupt_level "\n", task_mode.last_status_string(), level);
367
368  printf("%s - set mode to original mode - ", self.name_string());
369  task_mode.set_mode(current_mode,
370                     RTEMS_PREEMPT_MASK | RTEMS_TIMESLICE_MASK |
371                     RTEMS_ASR_MASK | RTEMS_INTERRUPT_MASK);
372  task_mode.get_mode(mode);
373  printf("%s,\n\t mode is 0x%08" PRIXrtems_mode ", ", task_mode.last_status_string(), mode);
374  print_mode(mode, RTEMS_ALL_MODES);
375  printf("\n");
376
377  printf(" END TaskMode Class test\n");
378}
379
380void Task1::screen4(void)
381{
382  printf(" START Event Class test\n");
383
384  printf("%s - create task 2 - ", name_string());
385  Task2 task_2("TA2", (rtems_task_priority) 9, RTEMS_MINIMUM_STACK_SIZE * 6);
386  printf("%s\n", task_2.last_status_string());
387
388  printf("%s - start task 2 - ", name_string());
389  task_2.start(0);
390  printf("%s\n", task_2.last_status_string());
391
392  printf("%s - construct event connecting to task 2 - ", name_string());
393  rtemsEvent event_2("TA2 ");
394  printf("%s\n", event_2.last_status_string());
395
396  // wait for task 2 to complete its timeout tests
397  wake_after(7000000);
398
399  printf("%s - send event signal 0 using the task id - ", name_string());
400  event_2.send(task_2.id_is(), RTEMS_SIGNAL_0);
401  printf("%s\n", event_2.last_status_string());
402
403  wake_after(1000000);
404
405  printf("%s - send event signal 0 using the task object reference - ", name_string());
406  event_2.send(task_2, RTEMS_SIGNAL_0);
407  printf("%s\n", event_2.last_status_string());
408
409  wake_after(1000000);
410
411  printf("%s - send event signal 31 using connected id - ", name_string());
412  event_2.send(RTEMS_SIGNAL_31);
413  printf("%s\n", event_2.last_status_string());
414
415  wake_after(1000000);
416
417  rtemsEvent event_2_2;
418
419  event_2_2.connect("TA2");
420
421  printf("%s - send event signal 0 and 31 - ", name_string());
422  event_2_2.send(task_2, RTEMS_SIGNAL_0 | RTEMS_SIGNAL_31);
423  printf("%s\n", event_2_2.last_status_string());
424
425  printf("%s - waiting 5 secs for TA2 to finish\n", name_string());
426  wake_after(500000);
427
428  printf(" END Event Class test\n");
429}
430
431void Task1::screen5(void)
432{
433  printf(" START Interrupt Class test\n");
434
435  printf(" do not know a portable BSP type interrupt test\n");
436
437  printf(" END Interrupt Class test\n");
438}
439
440void Task1::screen6(void)
441{
442  printf(" START MessageQueue Class test\n");
443
444  printf("%s - construct message queue 1 with no memory error - ", name_string());
445  rtemsMessageQueue mq_1("MQ1", 1000000, 1000);
446  printf("%s\n", mq_1.last_status_string());
447
448  printf("%s - construct/create message queue 2 - ", name_string());
449  rtemsMessageQueue mq_2("MQ2", 4, 50);
450  printf("%s\n", mq_2.last_status_string());
451
452  const char *u1 = "normal send";
453  const char *u2 = "urgent send";
454  char in[100];
455  size_t  size;
456  uint32_t count;
457
458  printf("%s - send u1 to mq_2 - ", name_string());
459  mq_2.send(u1, strlen(u1) + 1);
460  printf("%s\n", mq_2.last_status_string());
461
462  printf("%s - urgent send u2 to mq_2 - ", name_string());
463  mq_2.urgent(u2, strlen(u2) + 1);
464  printf("%s\n", mq_2.last_status_string());
465
466  printf("%s - create task 3_1 - ", name_string());
467  Task3 task_3_1("TA31", 9, RTEMS_MINIMUM_STACK_SIZE * 6);
468  printf("%s\n", task_3_1.last_status_string());
469
470  printf("%s - start task 3_1 - ", name_string());
471  task_3_1.start(0);
472  printf("%s\n", task_3_1.last_status_string());
473
474  printf("%s - create task 3_2 - ", name_string());
475  Task3 task_3_2("TA32", 9, RTEMS_MINIMUM_STACK_SIZE * 6);
476  printf("%s\n", task_3_2.last_status_string());
477
478  printf("%s - start task 3_2 - ", name_string());
479  task_3_2.start(0);
480  printf("%s\n", task_3_1.last_status_string());
481
482  wake_after(1000000);
483
484  printf("%s - receive u2 on mq_2 ...\n", name_string()); fflush(stdout);
485  mq_2.receive(in, size, 5000000);
486  printf("%s - %s\n", name_string(), mq_2.last_status_string());
487
488  if (size == (strlen(u2) + 5))
489  {
490    if ((strncmp(in, task_3_1.name_string(), 4) == 0) &&
491        (strcmp(in + 4, u2) == 0))
492    {
493      printf("%s - message u2 received correctly\n", name_string());
494    }
495    else
496    {
497      printf("%s - message u2 received incorrectly, message='%s', size=%zu\n",
498             name_string(), in, size);
499    }
500  }
501  else
502    printf("%s - message u2 size incorrect, size=%zu\n", name_string(), size);
503
504  printf("%s - receive u1 on mq_2 ...\n", name_string()); fflush(stdout);
505  mq_2.receive(in, size, 5000000);
506  printf("%s - %s\n", name_string(), mq_2.last_status_string());
507
508  if (size == (strlen(u1) + 5))
509  {
510    if ((strncmp(in, task_3_2.name_string(), 4) == 0) &&
511        (strcmp(in + 4, u1) == 0))
512    {
513      printf("%s - message u1 received correctly\n", name_string());
514    }
515    else
516    {
517      printf("%s - message u1 received incorrectly, message='%s', size=%zu\n",
518             name_string(), in, size);
519    }
520  }
521  else
522    printf("%s - message u1 size incorrect, size=%zu\n", name_string(), size);
523
524  wake_after(3000000);
525
526  const char *b1 = "broadcast message";
527
528  printf("%s - broadcast send b1 ...\n", name_string());
529  mq_2.broadcast(b1, strlen(b1) + 1, count);
530  printf("%s - mq_2 broadcast send - %s, count=%" PRIi32 "\n",
531         name_string(), mq_2.last_status_string(), count);
532
533  wake_after(1000000);
534
535  printf("%s - receive message b1 on mq_2 from %s...\n",
536         name_string(), task_3_1.name_string()); fflush(stdout);
537  mq_2.receive(in, size, 5000000);
538  printf("%s - %s\n", name_string(), mq_2.last_status_string());
539
540  if (size == (strlen(b1) + 5))
541  {
542    if ((strncmp(in, task_3_1.name_string(), 4) == 0) &&
543        (strcmp(in + 4, b1) == 0))
544    {
545      printf("%s - message b1 received correctly\n", name_string());
546    }
547    else
548    {
549      printf("%s - message b1 received incorrectly, message='%s'\n",
550             name_string(), in);
551    }
552  }
553  else
554    printf("%s - message b1 size incorrect, size=%zu\n", name_string(), size);
555
556  printf("%s - receive message b1 on mq_2 from %s...\n",
557         name_string(), task_3_1.name_string()); fflush(stdout);
558  mq_2.receive(in, size, 5000000);
559  printf("%s - %s\n", name_string(), mq_2.last_status_string());
560
561  if (size == (strlen(b1) + 5))
562  {
563    if ((strncmp(in, task_3_2.name_string(), 4) == 0) &&
564        (strcmp(in + 4, b1) == 0))
565    {
566      printf("%s - message b1 received correctly\n", name_string());
567    }
568    else
569    {
570      printf("%s - message b1 received incorrectly, message='%s', size=%zu\n",
571             name_string(), in, size);
572    }
573  }
574  else
575    printf("%s - message b1 size incorrect, size=%zu\n", name_string(), size);
576
577  // wait for task 3_1, and 3_2 to complete their timeout tests, will
578  // start these after getting the broadcast message
579  wake_after(7000000);
580
581  const char *f1 = "flush message";
582
583  printf("%s - send f1 to mq_2 - ", name_string());
584  mq_2.send(f1, strlen(f1) + 1);
585  printf("%s\n", mq_2.last_status_string());
586
587  printf("%s - send f1 to mq_2 - ", name_string());
588  mq_2.send(f1, strlen(f1) + 1);
589  printf("%s\n", mq_2.last_status_string());
590
591  printf("%s - send f1 to mq_2 - ", name_string());
592  mq_2.send(f1, strlen(f1) + 1);
593  printf("%s\n", mq_2.last_status_string());
594
595  printf("%s - flush mq_2 - ", name_string());
596  mq_2.flush(count);
597  printf("%s, flushed=%" PRIi32 "\n", mq_2.last_status_string(), count);
598
599  printf(" END MessageQueue Class test\n");
600}
601
602void Task1::print_mode(rtems_mode mode, rtems_mode mask)
603{
604  rtemsTaskMode task_mode;
605  if (mask & RTEMS_PREEMPT_MASK)
606    printf("RTEMS_%sPREEMPT ",
607           task_mode.preemption_set(mode) ? "" : "NO_");
608  if (mask & RTEMS_TIMESLICE_MASK)
609    printf("RTEMS_%sTIMESLICE ",
610           task_mode.preemption_set(mode) ? "" : "NO_");
611  if (mask & RTEMS_ASR_MASK)
612    printf("RTEMS_%sASR ",
613           task_mode.asr_set(mode) ? "" : "NO_");
614  if (mask & RTEMS_INTERRUPT_MASK)
615    printf("INTMASK=%" PRIirtems_mode,
616           mode & RTEMS_INTERRUPT_MASK);
617}
618
619EndTask::EndTask(const char* name,
620                 const rtems_task_priority initial_priority,
621                 const uint32_t   stack_size)
622  : rtemsTask(name, initial_priority, stack_size, RTEMS_NO_PREEMPT)
623{
624}
625
626void EndTask::body(rtems_task_argument)
627{
628 TEST_END();
629 exit(0);
630}
631
Note: See TracBrowser for help on using the repository browser.