source: rtems/testsuites/tmtests/tm30/init.c @ 865bffd1

4.11
Last change on this file since 865bffd1 was 865bffd1, checked in by Joel Sherrill <joel.sherrill@…>, on May 7, 2012 at 9:57:35 PM

tm30 - Fix warning for Init needed prototype

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2012.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.com/license/LICENSE.
8 *
9 *  $Id$
10 */
11
12#ifdef HAVE_CONFIG_H
13#include "config.h"
14#endif
15
16#include <bsp.h>
17#include <coverhd.h>
18#include <tmacros.h>
19#include <timesys.h>
20#include "test_support.h"
21
22rtems_id barrier[ OPERATION_COUNT ];
23
24rtems_task Init(
25  rtems_task_argument argument
26);
27
28static void benchmark_barrier_create(
29  int    iteration,
30  void  *argument
31)
32{
33  rtems_status_code status;
34
35  status = rtems_barrier_create(
36    iteration + 1,
37    RTEMS_LOCAL | RTEMS_FIFO,
38    2,
39    &barrier[iteration]
40  );
41  directive_failed(status, "rtems_barrier_create");
42}
43
44static void benchmark_barrier_ident(
45  int    iteration,
46  void  *argument
47)
48{
49  rtems_status_code status;
50  rtems_id          id;
51
52  status = rtems_barrier_ident( iteration+1, &id );
53  directive_failed(status, "rtems_barrier_ident");
54}
55
56static void benchmark_barrier_delete(
57  int    iteration,
58  void  *argument
59)
60{
61  rtems_status_code status;
62
63  status = rtems_barrier_delete( barrier[iteration] );
64  directive_failed(status, "rtems_barrier_delete");
65}
66
67rtems_task Init(
68  rtems_task_argument argument
69)
70{
71  puts( "\n\n*** TIME TEST 30 ***" );
72
73  rtems_time_test_measure_operation(
74    "rtems_barrier_create",
75    benchmark_barrier_create,
76    NULL,
77    OPERATION_COUNT,
78    0
79  );
80 
81  rtems_time_test_measure_operation(
82    "rtems_barrier_ident",
83    benchmark_barrier_ident,
84    NULL,
85    OPERATION_COUNT,
86    0
87  );
88 
89  rtems_time_test_measure_operation(
90    "rtems_barrier_delete",
91    benchmark_barrier_delete,
92    NULL,
93    OPERATION_COUNT,
94    0
95  );
96 
97  puts( "*** END OF TIME TEST 30 ***" );
98
99  rtems_test_exit(0);
100}
101
102/* configuration information */
103
104#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
105#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
106
107#define CONFIGURE_MAXIMUM_TASKS             1
108#define CONFIGURE_MAXIMUM_BARRIERS          OPERATION_COUNT
109#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
110
111#define CONFIGURE_INIT
112
113#include <rtems/confdefs.h>
114/* end of file */
Note: See TracBrowser for help on using the repository browser.