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

4.115
Last change on this file since eb7f306d was eb7f306d, checked in by Joel Sherrill <joel.sherrill@…>, on 10/07/14 at 22:43:35

samples/base_sp: Fix printf() warning

  • Property mode set to 100644
File size: 1.0 KB
RevLine 
[ac7d5ef0]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 *
[7c1e6942]11 *  COPYRIGHT (c) 1989-2011.
[ac7d5ef0]12 *  On-Line Applications Research Corporation (OAR).
13 *
[98e4ebf5]14 *  The license and distribution terms for this file may be
15 *  found in the file LICENSE in this distribution or at
[c499856]16 *  http://www.rtems.org/license/LICENSE.
[ac7d5ef0]17 */
18
[e313551]19#ifdef HAVE_CONFIG_H
20#include "config.h"
21#endif
22
[ac7d5ef0]23#include "system.h"
[732276e]24#include "tmacros.h"
25
[df49c60]26#include <stdio.h>
[d25d17b]27#include <stdlib.h>
[ac7d5ef0]28
29rtems_task Application_task(
30  rtems_task_argument argument
31)
32{
33  rtems_id          tid;
34  rtems_status_code status;
[eb7f306d]35  unsigned int      a = (unsigned int) argument;
[ac7d5ef0]36
37  status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
[7c1e6942]38  directive_failed( status, "ident" );
[ac7d5ef0]39
[7c1e6942]40  printf(
[eb7f306d]41    "Application task was invoked with argument (%d) "
42    "and has id of 0x%" PRIxrtems_id "\n", a, tid
[7c1e6942]43  );
[ac7d5ef0]44
[9391f6d]45  TEST_END();
[ac7d5ef0]46  exit( 0 );
47}
Note: See TracBrowser for help on using the repository browser.