source: rtems/testsuites/samples/base_sp/init.c @ af43554

5
Last change on this file since af43554 was af43554, checked in by Sebastian Huber <sebastian.huber@…>, on 10/26/17 at 11:59:11

tests: Remove TEST_INIT

The TEST_EXTERN is a used only by the system.h style tests and they use
CONFIGURE_INIT appropriately.

Update #3170.
Update #3199.

  • Property mode set to 100644
File size: 1.2 KB
RevLine 
[5f0cd34]1/*
2 *  COPYRIGHT (c) 1989-2012.
[ac7d5ef0]3 *  On-Line Applications Research Corporation (OAR).
4 *
[98e4ebf5]5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
[c499856]7 *  http://www.rtems.org/license/LICENSE.
[ac7d5ef0]8 */
9
[e313551]10#ifdef HAVE_CONFIG_H
11#include "config.h"
12#endif
13
[df49c60]14#define CONFIGURE_INIT
[ac7d5ef0]15#include "system.h"
[7c1e6942]16#include "tmacros.h"
[df49c60]17#include <stdio.h>
[ac7d5ef0]18
[5f0cd34]19/* forward declarations to avoid warnings */
20rtems_task Init(rtems_task_argument argument);
21
[9391f6d]22const char rtems_test_name[] = "SAMPLE SINGLE PROCESSOR APPLICATION";
23
[ac7d5ef0]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
[9391f6d]34  TEST_BEGIN();
[ac7d5ef0]35  printf( "Creating and starting an application task\n" );
36
37  task_name = rtems_build_name( 'T', 'A', '1', ' ' );
38
[3652ad35]39  status = rtems_task_create( task_name, 1, RTEMS_MINIMUM_STACK_SIZE,
[ac7d5ef0]40             RTEMS_INTERRUPT_LEVEL(0), RTEMS_DEFAULT_ATTRIBUTES, &tid );
[7c1e6942]41  directive_failed( status, "create" );
[ac7d5ef0]42
43  status = rtems_task_start( tid, Application_task, ARGUMENT );
[7c1e6942]44  directive_failed( status, "start" );
[ac7d5ef0]45
46  status = rtems_task_delete( RTEMS_SELF );
[7c1e6942]47  directive_failed( status, "delete" );
[ac7d5ef0]48}
Note: See TracBrowser for help on using the repository browser.