diff options
Diffstat (limited to 'testsuites/tmtests/tmoverhd')
-rw-r--r-- | testsuites/tmtests/tmoverhd/dumrtems.h | 250 | ||||
-rw-r--r-- | testsuites/tmtests/tmoverhd/empty.c | 45 | ||||
-rw-r--r-- | testsuites/tmtests/tmoverhd/system.h | 54 | ||||
-rw-r--r-- | testsuites/tmtests/tmoverhd/testtask.c | 1232 | ||||
-rw-r--r-- | testsuites/tmtests/tmoverhd/tmoverhd.doc | 82 |
5 files changed, 0 insertions, 1663 deletions
diff --git a/testsuites/tmtests/tmoverhd/dumrtems.h b/testsuites/tmtests/tmoverhd/dumrtems.h deleted file mode 100644 index 4beae9e39f..0000000000 --- a/testsuites/tmtests/tmoverhd/dumrtems.h +++ /dev/null @@ -1,250 +0,0 @@ -/* dumrtems.h - * - * This include file contains phony macros to map - * executive calls to Empty_directive(). - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifndef __DUMRTEMS_h -#define __DUMRTEMS_h - -/* RTEMS call redefinition macros */ - -#undef rtems_signal_catch -#undef rtems_signal_send -#undef rtems_io_close -#undef rtems_io_control -#undef rtems_io_initialize -#undef rtems_io_open -#undef rtems_io_read -#undef rtems_io_write -#undef rtems_port_internal_to_external -#undef rtems_port_external_to_internal -#undef rtems_port_create -#undef rtems_port_delete -#undef rtems_port_ident -#undef rtems_event_receive -#undef rtems_event_send -#undef rtems_initialize_data_structures -#undef rtems_shutdown_executive -#undef rtems_interrupt_catch -#undef rtems_partition_create -#undef rtems_partition_delete -#undef rtems_partition_get_buffer -#undef rtems_partition_ident -#undef rtems_partition_return_buffer -#undef rtems_message_queue_broadcast -#undef rtems_message_queue_create -#undef rtems_message_queue_delete -#undef rtems_message_queue_flush -#undef rtems_message_queue_ident -#undef rtems_message_queue_receive -#undef rtems_message_queue_send -#undef rtems_message_queue_urgent -#undef rtems_region_create -#undef rtems_region_delete -#undef rtems_region_get_segment -#undef rtems_region_ident -#undef rtems_region_return_segment -#undef rtems_semaphore_create -#undef rtems_semaphore_delete -#undef rtems_semaphore_ident -#undef rtems_semaphore_obtain -#undef rtems_semaphore_release -#undef rtems_task_create -#undef rtems_task_delete -#undef rtems_task_ident -#undef rtems_task_mode -#undef rtems_task_restart -#undef rtems_task_resume -#undef rtems_task_set_priority -#undef rtems_task_start -#undef rtems_task_suspend -#undef rtems_clock_get -#undef rtems_clock_set -#undef rtems_clock_tick -#undef rtems_task_wake_after -#undef rtems_task_wake_when -#undef rtems_fatal_error_occurred -#undef rtems_rate_monotonic_create -#undef rtems_rate_monotonic_ident -#undef rtems_rate_monotonic_delete -#undef rtems_rate_monotonic_cancel -#undef rtems_rate_monotonic_period -#undef rtems_multiprocessing_announce -#undef rtems_timer_create -#undef rtems_timer_ident -#undef rtems_timer_delete -#undef rtems_timer_cancel -#undef rtems_timer_fire_after -#undef rtems_timer_fire_when -#undef rtems_timer_reset - -#define rtems_signal_catch( asraddr, mode ) \ - Empty_directive() -#define rtems_signal_send( tid, signal ) \ - Empty_directive() - -#define rtems_io_close( major, minor, argp, rval ) \ - Empty_directive() -#define rtems_io_control( major, minor, argp, rval ) \ - Empty_directive() -#define rtems_io_initialize( major, minor, argp, rval ) \ - Empty_directive() -#define rtems_io_open( major, minor, argp, rval ) \ - Empty_directive() -#define rtems_io_read( major, minor, argp, rval ) \ - Empty_directive() -#define rtems_io_write( major, minor, argp, rval ) \ - Empty_directive() - -#define rtems_port_internal_to_external( dpid, internal, external ) \ - Empty_directive() -#define rtems_port_external_to_internal( dpid, external, internal ) \ - Empty_directive() -#define rtems_port_create( name, intaddr, extaddr, length, dpid ) \ - Empty_directive() -#define rtems_port_delete( dpid ) \ - Empty_directive() -#define rtems_port_ident( name, dpid ) \ - Empty_directive() - -#define rtems_event_receive( eventin, options, timeout, eventout ) \ - Empty_directive() -#define rtems_event_send( tid, event ) \ - Empty_directive() - -#define rtems_initialize_executive( conftbl, cputbl ) \ - Empty_directive() -#define rtems_shutdown_executive( the_error ) \ - Empty_directive() - -#define rtems_interrupt_catch( israddr, vector, oldisr ) \ - Empty_directive() - -#define rtems_partition_create( name, paddr, length, bsize, attr, ptid ) \ - Empty_directive() -#define rtems_partition_delete( ptid ) \ - Empty_directive() -#define rtems_partition_get_buffer( ptid, bufaddr ) \ - Empty_directive() -#define rtems_partition_ident( name, node, ptid ) \ - Empty_directive() -#define rtems_partition_return_buffer( ptid, bufaddr ) \ - Empty_directive() - -#define rtems_message_queue_broadcast( qid, buffer, count ) \ - Empty_directive() -#define rtems_message_queue_create( name, count, attr, qid ) \ - Empty_directive() -#define rtems_message_queue_delete( qid ) \ - Empty_directive() -#define rtems_message_queue_flush( qid, count ) \ - Empty_directive() -#define rtems_message_queue_ident( name, node, qid ) \ - Empty_directive() -#define rtems_message_queue_receive( qid, buffer, options, timeout ) \ - Empty_directive() -#define rtems_message_queue_send( qid, buffer ) \ - Empty_directive() -#define rtems_message_queue_urgent( qid, buffer ) \ - Empty_directive() - -#define rtems_region_create( name, paddr, length, pagesize, attr, rnid ) \ - Empty_directive() -#define rtems_region_delete( rnid ) \ - Empty_directive() -#define rtems_region_get_segment( rnid, size, options, timeout, segaddr ) \ - Empty_directive() -#define rtems_region_ident( name, rnid ) \ - Empty_directive() -#define rtems_region_return_segment( rnid, segaddr ) \ - Empty_directive() - -#define rtems_semaphore_create( name, count, attr, priceil, smid ) \ - Empty_directive() -#define rtems_semaphore_delete( smid ) \ - Empty_directive() -#define rtems_semaphore_ident( name, node, smid ) \ - Empty_directive() -#define rtems_semaphore_obtain( smid, options, timeout ) \ - Empty_directive() -#define rtems_semaphore_release( smid ) \ - Empty_directive() - -#define rtems_task_create( name, priority, stack_size, mode, attr, tid ) \ - Empty_directive() -#define rtems_task_delete( tid ) \ - Empty_directive() -#define rtems_task_ident( name, node, tid ) \ - Empty_directive() -#define rtems_task_mode( mode, mask, pmode ) \ - Empty_directive() -#define rtems_task_restart( tid, arg ) \ - Empty_directive() -#define rtems_task_resume( tid ) \ - Empty_directive() -#define rtems_task_set_priority( tid, priority, ppriority ) \ - Empty_directive() -#define rtems_task_start( tid, saddr, arg ) \ - Empty_directive() -#define rtems_task_suspend( tid ) \ - Empty_directive() - -#define rtems_clock_get_tod( tod ) \ - Empty_directive() -#define rtems_clock_set( time ) \ - Empty_directive() -#define rtems_clock_tick() \ - Empty_directive() -#define rtems_task_wake_after( ticks ) \ - Empty_directive() -#define rtems_task_wake_when( time ) \ - Empty_directive() - -#define rtems_fatal_error_occurred( errcode ) \ - Empty_directive() - -#define rtems_rate_monotonic_create( name, id ) \ - Empty_directive() -#define rtems_rate_monotonic_ident( name, id ) \ - Empty_directive() -#define rtems_rate_monotonic_delete( id ) \ - Empty_directive() -#define rtems_rate_monotonic_cancel( id ) \ - Empty_directive() -#define rtems_rate_monotonic_period( id, period ) \ - Empty_directive() - -#define rtems_multiprocessing_announce() \ - Empty_directive() - -#define rtems_timer_create( name, tmid ) \ - Empty_directive() -#define rtems_timer_delete( tmid ) \ - Empty_directive() -#define rtems_timer_cancel( tmid ) \ - Empty_directive() -#define rtems_timer_ident( name, tmid ) \ - Empty_directive() -#define rtems_timer_fire_after( tmid, ticks, routine, user_data ) \ - Empty_directive() -#define rtems_timer_fire_when( tmid, time, routine, user_data ) \ - Empty_directive() -#define rtems_timer_reset( tmid ) \ - Empty_directive() - -#if defined(__GNUC__) -#define RTEMS_GCC_NOWARN_UNUSED RTEMS_UNUSED -#else -#define RTEMS_GCC_NOWARN_UNUSED -#endif - -#endif -/* end of include file */ diff --git a/testsuites/tmtests/tmoverhd/empty.c b/testsuites/tmtests/tmoverhd/empty.c deleted file mode 100644 index 97477c1298..0000000000 --- a/testsuites/tmtests/tmoverhd/empty.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * COPYRIGHT (c) 1989-2013. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "system.h" - -rtems_timer_service_routine Timer_handler( - rtems_id argument -) -{ -} - -rtems_asr Isr_handler( - rtems_signal_set signals -) -{ -} - -rtems_asr Asr_handler( - rtems_signal_set signals -) -{ -} - -rtems_task task_func(void) -{ -} - -void null_func(void) -{ -} - -rtems_status_code Empty_directive(void) -{ - return( RTEMS_SUCCESSFUL ); -} diff --git a/testsuites/tmtests/tmoverhd/system.h b/testsuites/tmtests/tmoverhd/system.h deleted file mode 100644 index afe0fe3d10..0000000000 --- a/testsuites/tmtests/tmoverhd/system.h +++ /dev/null @@ -1,54 +0,0 @@ -/* system.h - * - * This include file is used by all tests in the Time Suite. - * - * COPYRIGHT (c) 1989-1999. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - - -#include <tmacros.h> - -/* functions */ - -rtems_task Init( - rtems_task_argument argument -); - -rtems_timer_service_routine Timer_handler( - rtems_id argument -); - -rtems_asr Isr_handler( - rtems_signal_set signals -); - -rtems_asr Asr_handler( - rtems_signal_set signals -); - -extern rtems_task task_func(void); - -extern void null_func(void); - -extern rtems_status_code Empty_directive(void); - -#include <timesys.h> - -/* configuration information */ - -#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER - -#define CONFIGURE_MAXIMUM_TASKS 2 -#define CONFIGURE_TICKS_PER_TIMESLICE 0 - -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE - -#include <rtems/confdefs.h> - -/* end of include file */ diff --git a/testsuites/tmtests/tmoverhd/testtask.c b/testsuites/tmtests/tmoverhd/testtask.c deleted file mode 100644 index 2461759f9f..0000000000 --- a/testsuites/tmtests/tmoverhd/testtask.c +++ /dev/null @@ -1,1232 +0,0 @@ -/* - * COPYRIGHT (c) 1989-2013. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#if !defined(OPERATION_COUNT) -#define OPERATION_COUNT 100 -#endif - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <rtems/btimer.h> - -#define CONFIGURE_INIT -#include "system.h" - -const char rtems_test_name[] = "OVERHEAD"; - -uint8_t Memory_area[ 2048 ]; -uint8_t Internal_port_area[ 256 ]; -uint8_t External_port_area[ 256 ]; - -rtems_task Task_1( - rtems_task_argument argument -); - -rtems_task Init( - rtems_task_argument argument -) -{ rtems_id id; - rtems_status_code status; - - benchmark_timer_disable_subtracting_average_overhead( TRUE ); - - Print_Warning(); - - TEST_BEGIN(); - - status = rtems_task_create( - rtems_build_name( 'T', 'A', '1', ' ' ), - RTEMS_MAXIMUM_PRIORITY - 1, - RTEMS_MINIMUM_STACK_SIZE, - RTEMS_DEFAULT_MODES, - RTEMS_DEFAULT_ATTRIBUTES, - &id - ); - directive_failed( status, "rtems_task_create of TA1" ); - - status = rtems_task_start( id, Task_1, 0 ); - directive_failed( status, "rtems_task_start of TA1" ); - - rtems_task_exit(); -} - -/* comment out the following include to verify type are correct */ -#include "dumrtems.h" - -rtems_task Task_1( - rtems_task_argument argument -) -{ - rtems_name name RTEMS_GCC_NOWARN_UNUSED; - uint32_t index RTEMS_GCC_NOWARN_UNUSED; - rtems_id id RTEMS_GCC_NOWARN_UNUSED; - rtems_task_priority in_priority RTEMS_GCC_NOWARN_UNUSED; - rtems_task_priority out_priority RTEMS_GCC_NOWARN_UNUSED; - rtems_mode in_mode RTEMS_GCC_NOWARN_UNUSED; - rtems_mode mask RTEMS_GCC_NOWARN_UNUSED; - rtems_mode out_mode RTEMS_GCC_NOWARN_UNUSED; - rtems_time_of_day time RTEMS_GCC_NOWARN_UNUSED; - rtems_interval timeout RTEMS_GCC_NOWARN_UNUSED; - rtems_signal_set signals RTEMS_GCC_NOWARN_UNUSED; - void *address_1 RTEMS_GCC_NOWARN_UNUSED; - rtems_event_set events RTEMS_GCC_NOWARN_UNUSED; - long buffer[ 4 ] RTEMS_GCC_NOWARN_UNUSED; - uint32_t count RTEMS_GCC_NOWARN_UNUSED; - rtems_device_major_number major RTEMS_GCC_NOWARN_UNUSED; - rtems_device_minor_number minor RTEMS_GCC_NOWARN_UNUSED; - uint32_t io_result RTEMS_GCC_NOWARN_UNUSED; - uint32_t error RTEMS_GCC_NOWARN_UNUSED; - rtems_time_of_day tod RTEMS_GCC_NOWARN_UNUSED; - - name = rtems_build_name( 'N', 'A', 'M', 'E' ); - in_priority = 250; - in_mode = RTEMS_NO_PREEMPT; - mask = RTEMS_PREEMPT_MASK; - timeout = 100; - signals = RTEMS_SIGNAL_1 | RTEMS_SIGNAL_3; - major = 10; - minor = 0; - error = 100; - -/* rtems_shutdown_executive */ - - benchmark_timer_initialize(); - for ( index=1 ; index <= OPERATION_COUNT ; index++ ) - (void) rtems_shutdown_executive( error ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_shutdown_executive", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_task_create */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_task_create( - name, - in_priority, - RTEMS_MINIMUM_STACK_SIZE, - RTEMS_DEFAULT_MODES, - RTEMS_DEFAULT_ATTRIBUTES, - &id - ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_task_create", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_task_ident */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_task_ident( name, RTEMS_SEARCH_ALL_NODES, id ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_task_ident", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_task_start */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_task_start( id, Task_1, 0 ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_task_start", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_task_restart */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_task_restart( id, 0 ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_task_restart", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_task_delete */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_task_delete( id ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_task_delete", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_task_suspend */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_task_suspend( id ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_task_suspend", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_task_resume */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_task_resume( id ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_task_resume", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_task_set_priority */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_task_set_priority( id, in_priority, &out_priority ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_task_set_priority", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_task_mode */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_task_mode( in_mode, mask, &out_mode ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_task_mode", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_task_wake_when */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_task_wake_when( time ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_task_wake_when", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_task_wake_after */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_task_wake_after( timeout ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_task_wake_after", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_interrupt_catch */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_interrupt_catch( Isr_handler, 5, address_1 ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_interrupt_catch", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_clock_get_tod */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_clock_get_tod( &tod ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_clock_get_tod", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_clock_set */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_clock_set( time ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_clock_set", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_clock_tick */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_clock_tick(); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_clock_tick", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_timer_create */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_timer_create( name, &id ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_timer_create", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_timer_delete */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_timer_delete( id ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_timer_delete", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_timer_ident */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_timer_ident( name, id ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_timer_ident", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_timer_fire_after */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_timer_fire_after( - id, - timeout, - Timer_handler, - NULL - ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_timer_fire_after", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_timer_fire_when */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_timer_fire_when( - id, - time, - Timer_handler, - NULL - ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_timer_fire_when", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_timer_reset */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_timer_reset( id ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_timer_reset", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_timer_cancel */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_timer_cancel( id ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_timer_cancel", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_semaphore_create */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_semaphore_create( - name, - 128, - RTEMS_DEFAULT_ATTRIBUTES, - RTEMS_NO_PRIORITY, - &id - ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_semaphore_create", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_semaphore_delete */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_semaphore_delete( id ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_semaphore_delete", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_semaphore_ident */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_semaphore_ident( name, RTEMS_SEARCH_ALL_NODES, id ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_semaphore_ident", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_semaphore_obtain */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_semaphore_obtain( id, RTEMS_DEFAULT_OPTIONS, timeout ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_semaphore_obtain", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_semaphore_release */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_semaphore_release( id ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_semaphore_release", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_message_queue_create */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_message_queue_create( - name, - 128, - RTEMS_DEFAULT_ATTRIBUTES, - &id - ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_message_queue_create", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_message_queue_ident */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_message_queue_ident( - name, - RTEMS_SEARCH_ALL_NODES, - id - ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_message_queue_ident", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_message_queue_delete */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_message_queue_delete( id ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_message_queue_delete", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_message_queue_send */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_message_queue_send( id, (long (*)[4])buffer ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_message_queue_send", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_message_queue_urgent */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_message_queue_urgent( id, (long (*)[4])buffer ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_message_queue_urgent", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_message_queue_broadcast */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_message_queue_broadcast( - id, - (long (*)[4])buffer, - &count - ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_message_queue_broadcast", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_message_queue_receive */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_message_queue_receive( - id, - (long (*)[4])buffer, - RTEMS_DEFAULT_OPTIONS, - timeout - ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_message_queue_receive", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_message_queue_flush */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_message_queue_flush( id, &count ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_message_queue_flush", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_event_send */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_event_send( id, events ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_event_send", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_event_receive */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_event_receive( - RTEMS_EVENT_16, - RTEMS_DEFAULT_OPTIONS, - timeout, - &events - ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_event_receive", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_signal_catch */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_signal_catch( Asr_handler, RTEMS_DEFAULT_MODES ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_signal_catch", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_signal_send */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_signal_send( id, signals ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_signal_send", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_partition_create */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_partition_create( - name, - Memory_area, - 2048, - 128, - RTEMS_DEFAULT_ATTRIBUTES, - &id - ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_partition_create", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_partition_ident */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_partition_ident( name, RTEMS_SEARCH_ALL_NODES, id ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_partition_ident", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_partition_delete */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_partition_delete( id ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_partition_delete", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_partition_get_buffer */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_partition_get_buffer( id, address_1 ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_partition_get_buffer", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_partition_return_buffer */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_partition_return_buffer( id, address_1 ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_partition_return_buffer", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_region_create */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_region_create( - name, - Memory_area, - 2048, - 128, - RTEMS_DEFAULT_ATTRIBUTES, - &id - ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_region_create", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_region_ident */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_region_ident( name, id ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_region_ident", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_region_delete */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_region_delete( id ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_region_delete", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_region_get_segment */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_region_get_segment( - id, - 243, - RTEMS_DEFAULT_OPTIONS, - timeout, - &address_1 - ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_region_get_segment", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_region_return_segment */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_region_return_segment( id, address_1 ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_region_return_segment", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_port_create */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_port_create( - name, - Internal_port_area, - External_port_area, - 0xff, - &id - ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_port_create", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_port_ident */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_port_ident( name, id ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_port_ident", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_port_delete */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_port_delete( id ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_port_delete", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_port_external_to_internal */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_port_external_to_internal( - id, - &External_port_area[ 7 ], - address_1 - ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_port_external_to_internal", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_port_internal_to_external */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_port_internal_to_external( - id, - &Internal_port_area[ 7 ], - address_1 - ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_port_internal_to_external", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_io_initialize */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_io_initialize( - major, - minor, - address_1, - &io_result - ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_io_initialize", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_io_open */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_io_open( - major, - minor, - address_1, - &io_result - ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_io_open", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_io_close */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_io_close( - major, - minor, - address_1, - &io_result - ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_io_close", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_io_read */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_io_read( - major, - minor, - address_1, - &io_result - ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_io_read", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_io_write */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_io_write( - major, - minor, - address_1, - &io_result - ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_io_write", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_io_control */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_io_control( - major, - minor, - address_1, - &io_result - ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_io_control", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_fatal_error_occurred */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_fatal_error_occurred( error ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_fatal_error_occurred", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_rate_monotonic_create */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_rate_monotonic_create( name, &id ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_rate_monotonic_create", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_rate_monotonic_ident */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_rate_monotonic_ident( name, id ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_rate_monotonic_ident", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_rate_monotonic_delete */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_rate_monotonic_delete( id ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_rate_monotonic_delete", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_rate_monotonic_cancel */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_rate_monotonic_cancel( id ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_rate_monotonic_cancel", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_rate_monotonic_period */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_rate_monotonic_period( id, timeout ); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_rate_monotonic_period", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - -/* rtems_multiprocessing_announce */ - - benchmark_timer_initialize(); - for ( index = 1 ; index <= OPERATION_COUNT ; index ++ ) - (void) rtems_multiprocessing_announce(); - end_time = benchmark_timer_read(); - - put_time( - "overhead: rtems_multiprocessing_announce", - end_time, - OPERATION_COUNT, - overhead, - 0 - ); - - TEST_END(); - - rtems_test_exit( 0 ); -} diff --git a/testsuites/tmtests/tmoverhd/tmoverhd.doc b/testsuites/tmtests/tmoverhd/tmoverhd.doc deleted file mode 100644 index 8c1d97ed28..0000000000 --- a/testsuites/tmtests/tmoverhd/tmoverhd.doc +++ /dev/null @@ -1,82 +0,0 @@ -# COPYRIGHT (c) 1989-1999. -# On-Line Applications Research Corporation (OAR). -# -# The license and distribution terms for this file may be -# found in the file LICENSE in this distribution or at -# http://www.rtems.org/license/LICENSE. -# - -directives: - -+ rtems shutdown executive -+ rtems task create -+ rtems task ident -+ rtems task start -+ rtems task restart -+ rtems task delete -+ rtems task suspend -+ rtems task resume -+ rtems task set priority -+ rtems task mode -+ rtems task wake when -+ rtems task wake after -+ rtems interrupt catch -+ rtems clock get -+ rtems clock set -+ rtems clock tick -+ rtems timer create -+ rtems timer delete -+ rtems timer ident -+ rtems timer fire after -+ rtems timer fire when -+ rtems timer reset -+ rtems timer cancel -+ rtems semaphore create -+ rtems semaphore delete -+ rtems semaphore ident -+ rtems semaphore obtain -+ rtems semaphore release -+ rtems message queue create -+ rtems message queue ident -+ rtems message queue delete -+ rtems message queue send -+ rtems message queue urgent -+ rtems message queue broadcast -+ rtems message queue receive -+ rtems message queue flush -+ rtems event send -+ rtems event receive -+ rtems signal catch -+ rtems signal send -+ rtems partition create -+ rtems partition ident -+ rtems partition delete -+ rtems partition get buffer -+ rtems partition return buffer -+ rtems region create -+ rtems region ident -+ rtems region delete -+ rtems region get segment -+ rtems region return segment -+ rtems port create -+ rtems port ident -+ rtems port delete -+ rtems port external to internal -+ rtems port internal to external -+ rtems io initialize -+ rtems io open -+ rtems io close -+ rtems io read -+ rtems io write -+ rtems io control -+ rtems fatal error occurred -+ rtems rate monotonic create -+ rtems rate monotonic ident -+ rtems rate monotonic delete -+ rtems rate monotonic cancel -+ rtems rate monotonic period -+ rtems multiprocessing announce - -concepts: - -+ Test the overhead of various classic RTEMS directives. |