source: examples-v2/hello/both_hello/test.c @ cf50e57

4.11
Last change on this file since cf50e57 was cf50e57, checked in by Chris Johns <chrisj@…>, on Sep 20, 2014 at 11:01:42 PM

Add RTEMS trace support.

  • Property mode set to 100644
File size: 1.1 KB
Line 
1/*
2 *  Simple test program -- simplified version of sample test hello.
3 */
4
5#include <bsp.h>
6#include <stdio.h>
7#include <stdlib.h>
8#include <unistd.h>
9
10long trace_test(int a, unsigned long b, long long c)
11{
12  printf ("int a=%i, unsigned long b=%u, long long c=%lli\n",
13          a, b, c);
14  return (long) (a + b);
15}
16
17rtems_task hello_init(
18  rtems_task_argument ignored
19)
20{
21  printf( "Classic -- Hello World\n" );
22  //trace_test(1, 2, 3);
23  rtems_task_delete( RTEMS_SELF );
24}
25
26#define CONFIGURE_INIT_TASK_ENTRY_POINT hello_init
27
28int main(int argc, char** argv)
29{
30  hello_init(0);
31}
32
33void *POSIX_Init(
34  void *argument
35)
36{
37  printf( "POSIX -- Hello World\n" );
38  sleep( 1 );
39  //trace_test(1, 2, 3);
40  exit( 0 );
41}
42
43/* configuration information */
44
45#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
46#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
47
48#define CONFIGURE_POSIX_INIT_THREAD_TABLE
49#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
50
51#define CONFIGURE_MAXIMUM_TASKS 1
52#define CONFIGURE_MAXIMUM_POSIX_THREADS 1
53
54#define CONFIGURE_INIT
55#include <rtems/confdefs.h>
56/* end of file */
Note: See TracBrowser for help on using the repository browser.