source: rtems/testsuites/samples/base_sp/init.c @ 3ee19b7a

Last change on this file since 3ee19b7a was 51b3cbca, checked in by Sebastian Huber <sebastian.huber@…>, on 10/04/18 at 13:23:25

tests: Use rtems_task_exit()

Update #3533.

  • Property mode set to 100644
File size: 1.1 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2012.
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#include "tmacros.h"
17#include <stdio.h>
18
19/* forward declarations to avoid warnings */
20rtems_task Init(rtems_task_argument argument);
21
22const char rtems_test_name[] = "SAMPLE SINGLE PROCESSOR APPLICATION";
23
24#define ARGUMENT 0
25
26rtems_task Init(
27  rtems_task_argument argument
28)
29{
30  rtems_name        task_name;
31  rtems_id          tid;
32  rtems_status_code status;
33
34  TEST_BEGIN();
35  printf( "Creating and starting an application task\n" );
36
37  task_name = rtems_build_name( 'T', 'A', '1', ' ' );
38
39  status = rtems_task_create( task_name, 1, RTEMS_MINIMUM_STACK_SIZE,
40             RTEMS_INTERRUPT_LEVEL(0), RTEMS_DEFAULT_ATTRIBUTES, &tid );
41  directive_failed( status, "create" );
42
43  status = rtems_task_start( tid, Application_task, ARGUMENT );
44  directive_failed( status, "start" );
45
46  rtems_task_exit();
47}
Note: See TracBrowser for help on using the repository browser.