source: rtems/testsuites/samples/base_sp/apptask.c @ 55658c6

4.115
Last change on this file since 55658c6 was 7c1e6942, checked in by Joel Sherrill <joel.sherrill@…>, on 05/05/11 at 16:45:40

2011-05-05 Joel Sherrill <joel.sherrill@…>

  • base_sp/apptask.c, base_sp/init.c, fileio/init.c, fileio/system.h, nsecs/init.c, ticker/init.c, ticker/system.h, ticker/tasks.c: Remove warnings.
  • 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-2011.
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  directive_failed( status, "ident" );
40
41  printf(
42    "Application task was invoked with argument (%" PRIdrtems_task_argument ") "
43    "and has id of 0x%" PRIxrtems_id "\n", argument, tid
44  );
45
46  printf( "*** END OF SAMPLE SINGLE PROCESSOR APPLICATION ***\n" );
47  exit( 0 );
48}
Note: See TracBrowser for help on using the repository browser.