Changeset 6cc1c29 in rtems


Ignore:
Timestamp:
Dec 8, 2009, 9:39:21 PM (9 years ago)
Author:
Glenn Humphrey <glenn.humphrey@…>
Branches:
4.10, 4.11, master
Children:
a7a9af76
Parents:
fe484280
Message:

2009-12-08 Glenn Humphrey <glenn.humphrey@…>

  • support/include/test_support.h, support/include/tmacros.h, support/src/test_support.c: Added support functions to spin for a number of ticks and to spin until the next tick.
  • support/src/spin.c: New file.
Location:
testsuites
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • testsuites/ChangeLog

    rfe484280 r6cc1c29  
     12009-12-08      Glenn Humphrey <glenn.humphrey@OARcorp.com>
     2
     3        * support/include/test_support.h, support/include/tmacros.h,
     4        support/src/test_support.c: Added support functions to spin for a
     5        number of ticks and to spin until the next tick.
     6        * support/src/spin.c: New file.
     7
    182009-12-08      Joel Sherrill <joel.sherrill@oarcorp.com>
    29
  • testsuites/support/include/test_support.h

    rfe484280 r6cc1c29  
    11/*
    2  *  Support routines for test code.
     2 *  COPYRIGHT (c) 1989-2009.
     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.
    38 *
    49 *  $Id$
     
    1217#endif
    1318
    14 extern void Allocate_majority_of_workspace( int smallest );
    15 extern const char *Get_Too_Long_Name(void);
    16 extern const char *Get_Longest_Name(void);
     19/*
     20 *  Allocate a number of small blocks from the heap
     21 *  until the largest free block of memory available is
     22 *  smaller than smallest.
     23 *
     24 *  NOTE: The memory CANNOT be freed.
     25 */
     26void Allocate_majority_of_workspace( int smallest );
     27
     28/*
     29 *  Return a pointer to the POSIX name that is slightly
     30 *  beyond the legal limit.
     31 */
     32const char *Get_Too_Long_Name(void);
     33
     34/*
     35 *  Return a pointer to the longest legal POSIX name.
     36 */
     37const char *Get_Longest_Name(void);
     38
     39/*
     40 *  Spin for specified number of ticks.
     41 */
     42void rtems_test_spin_for_ticks(int ticks);
     43
     44/*
     45 *  Spin until the next clock tick
     46 */
     47void rtems_test_spin_until_next_tick( void );
    1748
    1849#ifdef __cplusplus
  • testsuites/support/include/tmacros.h

    rfe484280 r6cc1c29  
    4646 *  mode/state of the test.  Normally it should be 0 when in task space.
    4747 */
    48 
    4948#define check_dispatch_disable_level( _expect ) \
    5049  do { \
    5150    if ( (_expect) != -1 && _Thread_Dispatch_disable_level != (_expect) ) { \
    52       printf( "\n_Thread_Dispatch_disable_level is (%" PRId32 ") not %d\n", \
    53               _Thread_Dispatch_disable_level, (_expect) ); \
     51      printk( \
     52        "\n_Thread_Dispatch_disable_level is (%" PRId32 \
     53           ") not %d detected at %s:%d\n", \
     54         _Thread_Dispatch_disable_level, (_expect), __FILE__, __LINE__ ); \
    5455      FLUSH_OUTPUT(); \
    5556      rtems_test_exit( 1 ); \
     
    6061 *  These macros properly report errors within the Classic API
    6162 */
    62 
    6363#define directive_failed( _dirstat, _failmsg )  \
    6464 fatal_directive_status( _dirstat, RTEMS_SUCCESSFUL, _failmsg )
  • testsuites/support/src/test_support.c

    rfe484280 r6cc1c29  
    1 /*  long_name
    2  *
    3  *  This set of routines is create names that are the maximum length or one over
    4  *  the maximum length.
    5  *
    6  *  Output parameters:  constant character string of max length or max length + 1
    7  *
    8  *  COPYRIGHT (c) 1989-2008.
     1/*
     2 *  COPYRIGHT (c) 1989-2009.
    93 *  On-Line Applications Research Corporation (OAR).
    104 *
Note: See TracChangeset for help on using the changeset viewer.