/* * COPYRIGHT (c) 1989-2018. * On-Line Applications Research Corporation (OAR). * * Permission to use, copy, modify, and/or distribute this software * for any purpose with or without fee is hereby granted. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include "test_support.h" const char rtems_test_name[] = "@UPPER@";"" /* forward declarations to avoid warnings */ void *POSIX_Init(void *argument); void benchmark_NAME_OF_CREATE_OPERATION(void); void benchmark_NAME_OF_DELETE_OPERATION(void); void benchmark_NAME_OF_CREATE_OPERATION(void) { long end_time; int status; benchmark_timer_initialize(); /* XXX single shot CREATE operation goes here -- test expected status */ /* XXX outside of the benchmark'ed region */ end_time = benchmark_timer_read(); rtems_test_assert( status == 0 ); put_time( "@DESC@", /* XXX fix to indicate create name */ end_time, 1, /* Only executed once */ 0, 0 ); } void benchmark_NAME_OF_DELETE_OPERATION(void) { long end_time; int status; benchmark_timer_initialize(); /* XXX single shot operation goes here -- test expected status outside */ /* XXX of the benchmark'ed region */ end_time = benchmark_timer_read(); rtems_test_assert( status == 0 ); put_time( "@DESC@", /* XXX fix to indicate delete name */ end_time, 1, /* Only executed once */ 0, 0 ); } void *POSIX_Init( void *argument ) { TEST_BEGIN(); /* XXX any required initialization goes here */ benchmark_NAME_OF_CREATE_OPERATION(); benchmark_NAME_OF_DELETE_OPERATION(); TEST_END(); rtems_test_exit(0); } /* configuration information */ #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER /* XXX configure an instance of the object created/destroyed */ #define CONFIGURE_MAXIMUM_POSIX_THREADS 1 #define CONFIGURE_POSIX_INIT_THREAD_TABLE #define CONFIGURE_INIT #include /* end of file */