source: rtems/testsuites/sptests/spprofiling01/init.c @ 4dad4b8

4.115
Last change on this file since 4dad4b8 was 4dad4b8, checked in by Sebastian Huber <sebastian.huber@…>, on 03/10/14 at 13:39:49

sapi: Add profiling application level support

  • Property mode set to 100644
File size: 1.3 KB
Line 
1/*
2 * Copyright (c) 2014 embedded brains GmbH.  All rights reserved.
3 *
4 *  embedded brains GmbH
5 *  Dornierstr. 4
6 *  82178 Puchheim
7 *  Germany
8 *  <rtems@embedded-brains.de>
9 *
10 * The license and distribution terms for this file may be
11 * found in the file LICENSE in this distribution or at
12 * http://www.rtems.com/license/LICENSE.
13 */
14
15#ifdef HAVE_CONFIG_H
16  #include "config.h"
17#endif
18
19#include <rtems/profiling.h>
20#include <rtems/bspIo.h>
21#include <rtems.h>
22
23#include <stdio.h>
24
25#include "tmacros.h"
26
27static void test(void)
28{
29  rtems_status_code sc;
30  int rv;
31
32  sc = rtems_task_wake_after(3);
33  rtems_test_assert(sc == RTEMS_SUCCESSFUL);
34
35  rv = rtems_profiling_report_xml("X", rtems_printf_plugin, NULL, 1, "  ");
36  printf("characters produced by rtems_profiling_report_xml(): %i\n", rv);
37}
38
39static void Init(rtems_task_argument arg)
40{
41  puts("\n\n*** TEST SPPROFILING 1 ***");
42
43  test();
44
45  puts("*** END OF TEST SPPROFILING 1 ***");
46
47  rtems_test_exit(0);
48}
49
50#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
51#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
52
53#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
54
55#define CONFIGURE_MAXIMUM_TASKS 1
56
57#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
58
59#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
60
61#define CONFIGURE_INIT
62
63#include <rtems/confdefs.h>
Note: See TracBrowser for help on using the repository browser.