source: rtems/testsuites/sptests/sp60/init.c @ 3c8eda7

4.115
Last change on this file since 3c8eda7 was 3c8eda7, checked in by Joel Sherrill <joel.sherrill@…>, on 05/12/12 at 16:01:26

sptests - Eliminate missing prototype warnings

  • Property mode set to 100644
File size: 2.2 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
10#ifdef HAVE_CONFIG_H
11#include "config.h"
12#endif
13
14#include <tmacros.h>
15
16/* forward declarations to avoid warnings */
17rtems_task Init(rtems_task_argument argument);
18
19rtems_task Init(
20  rtems_task_argument ignored
21)
22{
23  rtems_status_code     sc;
24  rtems_id              period1;
25  rtems_id              period2;
26
27  puts( "\n\n*** TEST 60 ***" );
28
29  puts( "Init - rtems_rate_monotonic_create - first period" );
30  sc = rtems_rate_monotonic_create(
31    rtems_build_name( 'P', 'E', 'R', '1' ),
32    &period1
33  );
34  directive_failed( sc, "rtems_rate_monotonic_create 1" );
35
36  puts( "Init - rtems_rate_monotonic_create - second period" );
37  sc = rtems_rate_monotonic_create(
38    rtems_build_name( 'P', 'E', 'R', '2' ),
39    &period2
40  );
41  directive_failed( sc, "rtems_rate_monotonic_create 1" );
42
43  puts( "Init - rtems_rate_monotonic_period - short period" );
44  sc = rtems_rate_monotonic_period(period1, RTEMS_MILLISECONDS_TO_TICKS(200) );
45  directive_failed( sc, "rtems_rate_monotonic_period" );
46
47  puts( "Init - rtems_rate_monotonic_period - long period initiated" );
48  sc = rtems_rate_monotonic_period(period2, RTEMS_MILLISECONDS_TO_TICKS(1000) );
49  directive_failed( sc, "rtems_rate_monotonic_period" );
50
51  puts( "Init - rtems_rate_monotonic_period - long period block" );
52  sc = rtems_rate_monotonic_period(period2, RTEMS_MILLISECONDS_TO_TICKS(1000) );
53  directive_failed( sc, "rtems_rate_monotonic_period" );
54
55  puts( "Init - rtems_rate_monotonic_period - verify long period expired" );
56  sc = rtems_rate_monotonic_period(period1, RTEMS_PERIOD_STATUS );
57  fatal_directive_status(sc, RTEMS_TIMEOUT, "rtems_task_period status");
58
59  puts( "*** END OF TEST 60 ***" );
60  rtems_test_exit(0);
61}
62
63/* configuration information */
64
65#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
66#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
67
68#define CONFIGURE_MAXIMUM_TASKS         1
69#define CONFIGURE_MAXIMUM_PERIODS       2
70#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
71
72#define CONFIGURE_INIT
73#include <rtems/confdefs.h>
74
75/* global variables */
Note: See TracBrowser for help on using the repository browser.