source: rtems/testsuites/sptests/sp03/init.c

Last change on this file was 51b3cbca, checked in by Sebastian Huber <sebastian.huber@…>, on Oct 4, 2018 at 1:23:25 PM

tests: Use rtems_task_exit()

Update #3533.

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2011.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.org/license/LICENSE.
8 */
9
10#ifdef HAVE_CONFIG_H
11#include "config.h"
12#endif
13
14#define CONFIGURE_INIT
15#include "system.h"
16
17const char rtems_test_name[] = "SP 3";
18
19rtems_task Init(
20  rtems_task_argument argument
21)
22{
23  rtems_status_code status;
24  rtems_id          id;
25
26  TEST_BEGIN();
27
28  status = rtems_task_create(
29    rtems_build_name( 'T', 'A', '1', ' ' ),
30    1,
31    RTEMS_MINIMUM_STACK_SIZE * 2,
32    RTEMS_DEFAULT_MODES,
33    RTEMS_DEFAULT_ATTRIBUTES,
34    &id
35  );
36  directive_failed( status, "rtems_task_create of TA1" );
37
38  status = rtems_task_start( id, Task_1, 0 );
39  directive_failed( status, "rtems_task_start of TA1" );
40
41  status = rtems_task_create(
42    rtems_build_name( 'T', 'A', '2', ' ' ),
43    1,
44    RTEMS_MINIMUM_STACK_SIZE,
45    RTEMS_DEFAULT_MODES,
46    RTEMS_DEFAULT_ATTRIBUTES,
47    &id
48  );
49  directive_failed( status, "rtems_task_create of TA2" );
50
51  status = rtems_task_start( id, Task_2, 0 );
52  directive_failed( status, "rtems_task_start of TA2" );
53
54  rtems_task_exit();
55}
Note: See TracBrowser for help on using the repository browser.