Changeset 614821e in rtems for testsuites/sptests/sp32/init.c


Ignore:
Timestamp:
Oct 14, 2009, 9:35:05 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
bc7353d5
Parents:
c54e6f5
Message:

2009-10-14 Joel Sherrill <joel.sherrill@…>

  • sp32/init.c: Lengthen the clock tick and move configuration to the bottom of the file.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/sp32/init.c

    rc54e6f5 r614821e  
    1 /* spmonotonic -- sanity check the rate monotonic manager
     1/*
     2 *  COPYRIGHT (c) 1989-2009.
     3 *  On-Line Applications Research Corporation (OAR).
    24 *
    3  * license and distribution terms for this file may be found in the file
    4  * LICENSE in this distribution or at
    5  * http://www.rtems.com/license/LICENSE .
     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.
    68 *
    79 * $Id$
    810 */
    911
    10 #define CONFIGURE_INIT
    1112#include <tmacros.h>  /* includes bsp.h, stdio, etc... */
    12 
    13 /* prototype */
    14 rtems_task Init (rtems_task_argument ignored);
    15 
    16 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
    17 
    18 #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
    19 #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
    20 #define CONFIGURE_MAXIMUM_TASKS        1
    21 #define CONFIGURE_MAXIMUM_PERIODS      1
    22 
    23 #define CONFIGURE_INIT
    24 
    25 #include <rtems/confdefs.h>
    2613
    2714rtems_task Init(
     
    4532
    4633  /* start period with initial value */
    47   status = rtems_rate_monotonic_period(
    48       period_id,
    49       wantintervals[0]
    50   );
    51   directive_failed(status, "rate_monotonic_period");
     34  status = rtems_rate_monotonic_period( period_id, wantintervals[0] );
     35  directive_failed(status, "rate_monotonic_period #1");
    5236
    5337  /* get our first timestamp */
    54   status = rtems_clock_get(
    55       RTEMS_CLOCK_GET_TICKS_SINCE_BOOT,
    56       &timestamps[0]
    57   );
     38  status = rtems_clock_get( RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &timestamps[0] );
    5839  directive_failed(status, "clock_get");
    5940
     
    6142  for (loopy = 1; loopy < 5; loopy++) {
    6243
    63     status = rtems_rate_monotonic_period(
    64         period_id,
    65         wantintervals[loopy]
    66     );
    67     directive_failed(status, "rate_monotonic_period");
     44    status = rtems_rate_monotonic_period( period_id, wantintervals[loopy] );
     45    directive_failed(status, "rate_monotonic_period #2");
    6846
    6947    status = rtems_clock_get(
     
    7553
    7654  /* block one last time */
    77   status = rtems_rate_monotonic_period(
    78       period_id,
    79       1
    80   );
    81   directive_failed(status, "rate_monotonic_period");
     55  status = rtems_rate_monotonic_period( period_id, 1 );
     56  directive_failed(status, "rate_monotonic_period #3");
    8257
    8358  /* get one last timestamp */
     
    10984  rtems_test_exit(0);
    11085}
     86
     87#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
     88
     89#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
     90#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
     91#define CONFIGURE_MAXIMUM_TASKS        1
     92#define CONFIGURE_MAXIMUM_PERIODS      1
     93
     94#define CONFIGURE_MICROSECONDS_PER_TICK 100000
     95
     96#define CONFIGURE_INIT
     97
     98#include <rtems/confdefs.h>
     99
Note: See TracChangeset for help on using the changeset viewer.