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

Last change on this file since af43554 was af43554, checked in by Sebastian Huber <sebastian.huber@…>, on Oct 26, 2017 at 11:59:11 AM

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
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 <stdio.h>
17
18#include "tmacros.h"
19
20/* forward declarations to avoid warnings */
21rtems_task Init(rtems_task_argument argument);
22
23const char rtems_test_name[] = "SAMPLE MULTIPROCESSOR APPLICATION";
24
25rtems_task Init(
26  rtems_task_argument argument
27)
28{
29  rtems_name        task_name;
30  rtems_id          tid;
31  rtems_status_code status;
32
33  TEST_BEGIN();
34  printf( "Creating and starting an application task\n" );
35  task_name = rtems_build_name( 'T', 'A', '1', ' ' );
36  status = rtems_task_create( task_name, 1, RTEMS_MINIMUM_STACK_SIZE,
37             RTEMS_INTERRUPT_LEVEL(0), RTEMS_DEFAULT_ATTRIBUTES, &tid );
38  rtems_test_assert(status == RTEMS_SUCCESSFUL);
39
40  status = rtems_task_start(
41    tid,
42    Application_task,
43    Multiprocessing_configuration.node
44  );
45  rtems_test_assert(status == RTEMS_SUCCESSFUL);
46
47  rtems_task_delete( RTEMS_SELF );
48}
Note: See TracBrowser for help on using the repository browser.