source: rtems/testsuites/samples/base_sp/apptask.c @ e313551

4.11
Last change on this file since e313551 was e313551, checked in by Ralf Corsepius <ralf.corsepius@…>, on Feb 22, 2011 at 10:58:44 AM

Add HAVE_CONFIG_H.

  • Property mode set to 100644
File size: 1.1 KB
Line 
1/*  Application_task
2 *
3 *  This routine is as an example of an application task which
4 *  prints a message including its RTEMS task id.  This task
5 *  then invokes exit to return to the monitor.
6 *
7 *  Input parameters:  NONE
8 *
9 *  Output parameters:  NONE
10 *
11 *  COPYRIGHT (c) 1989-1999.
12 *  On-Line Applications Research Corporation (OAR).
13 *
14 *  The license and distribution terms for this file may be
15 *  found in the file LICENSE in this distribution or at
16 *  http://www.rtems.com/license/LICENSE.
17 *
18 *  $Id$
19 */
20
21#ifdef HAVE_CONFIG_H
22#include "config.h"
23#endif
24
25#include "system.h"
26#include "tmacros.h"
27
28#include <stdio.h>
29#include <stdlib.h>
30
31rtems_task Application_task(
32  rtems_task_argument argument
33)
34{
35  rtems_id          tid;
36  rtems_status_code status;
37
38  status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
39
40  printf( "Application task was invoked with argument (%" PRIdrtems_task_argument ") "
41          "and has id of 0x%" PRIxrtems_id "\n", argument, tid );
42
43  printf( "*** END OF SAMPLE SINGLE PROCESSOR APPLICATION ***\n" );
44  exit( 0 );
45}
Note: See TracBrowser for help on using the repository browser.