change log for rtems (2010-12-06)

rtems-vc at rtems.org rtems-vc at rtems.org
Mon Dec 6 17:10:26 UTC 2010


 *joel*:
2010-12-06	Joel Sherrill <joel.sherrill at oarcorp.com>

	* .cvsignore, ChangeLog, Makefile.am, README, configure.ac,
	psxtmtests_plan.csv, psxtmmutex02/.cvsignore,
	psxtmmutex02/Makefile.am, psxtmmutex02/init.c,
	psxtmmutex02/psxtmmutex02.doc, psxtmthread01/.cvsignore,
	psxtmthread01/Makefile.am, psxtmthread01/init.c,
	psxtmthread01/psxtmthread01.doc, psxtmthread03/.cvsignore,
	psxtmthread03/Makefile.am, psxtmthread03/init.c,
	psxtmthread03/psxtmthread03.doc: New files.

A    1.1  testsuites/psxtmtests/.cvsignore
A    1.1  testsuites/psxtmtests/ChangeLog
A    1.1  testsuites/psxtmtests/Makefile.am
A    1.1  testsuites/psxtmtests/README
A    1.1  testsuites/psxtmtests/configure.ac
A    1.1  testsuites/psxtmtests/psxtmmutex02/.cvsignore
A    1.1  testsuites/psxtmtests/psxtmmutex02/Makefile.am
A    1.1  testsuites/psxtmtests/psxtmmutex02/init.c
A    1.1  testsuites/psxtmtests/psxtmmutex02/psxtmmutex02.doc
A    1.1  testsuites/psxtmtests/psxtmtests_plan.csv
A    1.1  testsuites/psxtmtests/psxtmthread01/.cvsignore
A    1.1  testsuites/psxtmtests/psxtmthread01/Makefile.am
A    1.1  testsuites/psxtmtests/psxtmthread01/init.c
A    1.1  testsuites/psxtmtests/psxtmthread01/psxtmthread01.doc
A    1.1  testsuites/psxtmtests/psxtmthread03/.cvsignore
A    1.1  testsuites/psxtmtests/psxtmthread03/Makefile.am
A    1.1  testsuites/psxtmtests/psxtmthread03/init.c
A    1.1  testsuites/psxtmtests/psxtmthread03/psxtmthread03.doc

diff -u /dev/null rtems/testsuites/psxtmtests/.cvsignore:1.1
--- /dev/null	Mon Dec  6 11:10:24 2010
+++ rtems/testsuites/psxtmtests/.cvsignore	Mon Dec  6 10:35:30 2010
@@ -0,0 +1,14 @@
+aclocal.m4
+autom4te*.cache
+config.cache
+config.guess
+config.log
+config.status
+config.sub
+configure
+depcomp
+install-sh
+Makefile
+Makefile.in
+missing
+mkinstalldirs

diff -u /dev/null rtems/testsuites/psxtmtests/ChangeLog:1.1
--- /dev/null	Mon Dec  6 11:10:24 2010
+++ rtems/testsuites/psxtmtests/ChangeLog	Mon Dec  6 10:35:30 2010
@@ -0,0 +1,11 @@
+2010-12-06	Joel Sherrill <joel.sherrill at oarcorp.com>
+
+	* .cvsignore, ChangeLog, Makefile.am, README, configure.ac,
+	psxtmtests_plan.csv, psxtmmutex02/.cvsignore,
+	psxtmmutex02/Makefile.am, psxtmmutex02/init.c,
+	psxtmmutex02/psxtmmutex02.doc, psxtmthread01/.cvsignore,
+	psxtmthread01/Makefile.am, psxtmthread01/init.c,
+	psxtmthread01/psxtmthread01.doc, psxtmthread03/.cvsignore,
+	psxtmthread03/Makefile.am, psxtmthread03/init.c,
+	psxtmthread03/psxtmthread03.doc: New files.
+

diff -u /dev/null rtems/testsuites/psxtmtests/Makefile.am:1.1
--- /dev/null	Mon Dec  6 11:10:24 2010
+++ rtems/testsuites/psxtmtests/Makefile.am	Mon Dec  6 10:35:30 2010
@@ -0,0 +1,17 @@
+##
+## $Id$
+##
+
+ACLOCAL_AMFLAGS = -I ../aclocal
+
+if HAS_POSIX
+SUBDIRS = \
+    psxtmmutex02 \
+    psxtmthread01 psxtmthread03
+endif
+
+DIST_SUBDIRS = $(SUBDIRS)
+# EXTRA_DIST = psxfatal_support/init.c psxfatal_support/system.h
+
+include $(top_srcdir)/../automake/subdirs.am
+include $(top_srcdir)/../automake/local.am

diff -u /dev/null rtems/testsuites/psxtmtests/README:1.1
--- /dev/null	Mon Dec  6 11:10:24 2010
+++ rtems/testsuites/psxtmtests/README	Mon Dec  6 10:35:30 2010
@@ -0,0 +1,25 @@
+#
+#  $Id$
+#
+
+This directory contains the RTEMS POSIX Timing Test Suite.
+The tests in this directory are used to measure the execution
+time of RTEMS directive and some critical internal functions.
+The results of these test are useful for comparison of RTEMS
+performance 
+
++ between versions of RTEMS
++ between different boards 
++ across different architectures
+
+These tests attempt to benchmark RTEMS as the user would.  They measure
+the execution time for a directive (under various circumstances)
+from the time RTEMS is entered until it is executed.  Where possible,
+the time is the average of at least 100 invocations of the directive.
+
+The accuracy of the times reported by these benchmarks is very dependent
+on the resolution of the timer being used.  It is also important to
+insure that all sources of hardware interrupts are disabled during
+execution of the tests.  This insures that the directive time reported
+does not include any interrupt time.
+

diff -u /dev/null rtems/testsuites/psxtmtests/configure.ac:1.1
--- /dev/null	Mon Dec  6 11:10:25 2010
+++ rtems/testsuites/psxtmtests/configure.ac	Mon Dec  6 10:35:30 2010
@@ -0,0 +1,85 @@
+## Process this file with autoconf to produce a configure script.
+## 
+## $Id$
+
+AC_PREREQ(2.60)
+AC_INIT([rtems-c-src-tests-psxtmtests],[_RTEMS_VERSION],[http://www.rtems.org/bugzilla])
+AC_CONFIG_SRCDIR([psxtmmutex02])
+RTEMS_TOP([../..],[..])
+
+RTEMS_CANONICAL_TARGET_CPU
+
+AM_INIT_AUTOMAKE([no-define foreign 1.10])
+AM_MAINTAINER_MODE
+
+RTEMS_ENV_RTEMSBSP
+
+RTEMS_PROJECT_ROOT
+
+RTEMS_PROG_CC_FOR_TARGET
+
+RTEMS_CANONICALIZE_TOOLS
+
+RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
+
+RTEMS_CHECK_CPUOPTS([RTEMS_POSIX_API])
+AM_CONDITIONAL(HAS_POSIX,test x"${rtems_cv_RTEMS_POSIX_API}" = x"yes")
+
+# but newlib doesn't have sys/mman.h
+AC_CHECK_HEADERS([sys/mman.h])
+
+# FIXME: newlib should supply declaration of pthread_rwlock_unlock()
+AC_CHECK_DECLS([pthread_rwlock_unlock],[],[],[[#include <pthread.h>]])
+
+# FIXME: newlib should supply declaration of pthread_atfork()
+AC_CHECK_DECLS([pthread_atfork],[],[],[[#include <pthread.h>]])
+
+# FIXME: RTEMS presumes pthread_attr_getcputime to be IEEE Std 1003.1
+# Likely an anachronism in RTEMS.
+AC_CHECK_DECLS([pthread_attr_getcputime],[],[],[[#include <pthread.h>]])
+
+# FIXME: RTEMS presumes pthread_attr_getcputime to be IEEE Std 1003.1
+# Likely an anachronism in RTEMS.
+AC_CHECK_DECLS([pthread_attr_getcputime],[],[],[[#include <pthread.h>]])
+
+# FIXME: RTEMS presumes pthread_attr_setcputime to be IEEE Std 1003.1
+# Likely an anachronism in RTEMS.
+AC_CHECK_DECLS([pthread_attr_setcputime],[],[],[[#include <pthread.h>]])
+
+# Added to pthreads after initial revision.  May not be in toolset
+AC_CHECK_DECLS([pthread_attr_getstack],[],[],[[#include <pthread.h>]])
+
+# Added to pthreads after initial revision.  May not be in toolset
+AC_CHECK_DECLS([pthread_attr_setstack],[],[],[[#include <pthread.h>]])
+
+# Added to pthreads after initial revision.  May not be in toolset
+AC_CHECK_DECLS([pthread_attr_getguardsize],[],[],[[#include <pthread.h>]])
+
+# Added to pthreads after initial revision.  May not be in toolset
+AC_CHECK_DECLS([pthread_attr_setguardsize],[],[],[[#include <pthread.h>]])
+
+# FIXME: adjtime is a non-standardized BSD/Linux extension
+# RTEMS should not rely on adjtime
+AC_CHECK_DECLS([adjtime],[],[],[[#include <sys/time.h>]])
+
+# FIXME: IEEE Std 1003.1-2008 mandates mprotect in sys/mman.h,
+# RTEMS provides a stub, despite newlib doesn't have sys/mman.h
+AC_CHECK_DECLS([mprotect],[],[],[[#include <sys/mman.h>]])
+
+# FIXME: IEEE Std 1003.1-2008 mandates seteuid in unistd.h
+# RTEMS provides it, despite newlib doesn't declare it.
+AC_CHECK_DECLS([seteuid],[],[],[#include <unistd.h>])
+
+# FIXME: We should get rid of this. It's a cludge.
+AC_CHECK_SIZEOF([off_t])
+
+OPERATION_COUNT=${OPERATION_COUNT-100}
+AC_SUBST(OPERATION_COUNT)
+
+# Explicitly list all Makefiles here
+AC_CONFIG_FILES([Makefile
+psxtmmutex02/Makefile
+psxtmthread01/Makefile
+psxtmthread03/Makefile
+])
+AC_OUTPUT

diff -u /dev/null rtems/testsuites/psxtmtests/psxtmmutex02/.cvsignore:1.1
--- /dev/null	Mon Dec  6 11:10:25 2010
+++ rtems/testsuites/psxtmtests/psxtmmutex02/.cvsignore	Mon Dec  6 10:35:30 2010
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in

diff -u /dev/null rtems/testsuites/psxtmtests/psxtmmutex02/Makefile.am:1.1
--- /dev/null	Mon Dec  6 11:10:25 2010
+++ rtems/testsuites/psxtmtests/psxtmmutex02/Makefile.am	Mon Dec  6 10:35:30 2010
@@ -0,0 +1,30 @@
+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = psxtmmutex02
+psxtmmutex02_SOURCES = init.c ../../tmtests/include/timesys.h \
+    ../../support/src/tmtests_empty_function.c \
+    ../../support/src/tmtests_support.c
+
+dist_rtems_tests_DATA = psxtmmutex02.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+OPERATION_COUNT = @OPERATION_COUNT@
+AM_CPPFLAGS += -I$(top_srcdir)/../tmtests/include
+AM_CPPFLAGS += -DOPERATION_COUNT=$(OPERATION_COUNT)
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(psxtmmutex02_OBJECTS) $(psxtmmutex02_LDADD)
+LINK_LIBS = $(psxtmmutex02_LDLIBS)
+
+psxtmmutex02$(EXEEXT): $(psxtmmutex02_OBJECTS) $(psxtmmutex02_DEPENDENCIES)
+	@rm -f psxtmmutex02$(EXEEXT)
+	$(make-exe)
+
+include $(top_srcdir)/../automake/local.am

diff -u /dev/null rtems/testsuites/psxtmtests/psxtmmutex02/init.c:1.1
--- /dev/null	Mon Dec  6 11:10:25 2010
+++ rtems/testsuites/psxtmtests/psxtmmutex02/init.c	Mon Dec  6 10:35:30 2010
@@ -0,0 +1,124 @@
+/*
+ *  COPYRIGHT (c) 1989-2010.
+ *  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.com/license/LICENSE.
+ *
+ *  $Id$
+ */
+
+#include <coverhd.h>
+#include <tmacros.h>
+#include <timesys.h>
+#include "test_support.h"
+#include <pthread.h>
+#include <sched.h>
+#include <rtems/timerdrv.h>
+
+pthread_mutex_t MutexId;
+
+void *Low(
+  void *argument
+)
+{
+  long end_time;
+
+  /*
+   * Now we have finished the thread startup overhead,
+   * so let other threads run.  When we return, we can
+   * finish the benchmark.
+   */
+  sched_yield();
+    /* let other threads run */
+
+  end_time = benchmark_timer_read();
+
+  put_time(
+    "pthread_mutex_lock (unavailable)",
+    end_time,
+    OPERATION_COUNT,
+    0,
+    0
+  );
+
+  puts( "*** END OF POSIX TIME TEST MUTEX 02 ***" );
+
+  rtems_test_exit( 0 );
+  return NULL;
+}
+
+void *Middle(
+  void *argument
+)
+{
+  int status;
+
+  /*
+   * Now we have finished the thread startup overhead,
+   * so let other threads run.  When we return, we can
+   * finish the benchmark.
+   */
+  sched_yield();
+    /* let other threads run */
+
+  status = pthread_mutex_lock( &MutexId );
+  rtems_test_assert( !status );
+
+  return NULL;
+}
+
+void *POSIX_Init(
+  void *argument
+)
+{
+  int        i;
+  int        status;
+  pthread_t  threadId;
+
+  puts( "\n\n*** POSIX TIME TEST MUTEX 02 ***" );
+
+  for ( i=0 ; i < OPERATION_COUNT - 1 ; i++ ) {
+    status = pthread_create( &threadId, NULL, Middle, NULL );
+    rtems_test_assert( !status );
+  }
+  
+  status = pthread_create( &threadId, NULL, Low, NULL );
+  rtems_test_assert( !status );
+
+  /*
+   * Deliberately create the mutex after the threads.  This way if the
+   * threads do run before we intend, they will get an error.
+   */
+  status = pthread_mutex_init( &MutexId, NULL );
+  rtems_test_assert( !status );
+
+  /*
+   * Let the other threads start so the thread startup overhead,
+   * is accounted for.  When we return, we can start the benchmark.
+   */
+  sched_yield();
+    /* let other threads run */
+
+  /* start the timer and switch through all the other tasks */
+  benchmark_timer_initialize();
+  status = pthread_mutex_lock( &MutexId );
+  rtems_test_assert( !status );
+
+  return NULL;
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
+
+#define CONFIGURE_MAXIMUM_POSIX_THREADS     OPERATION_COUNT + 2
+#define CONFIGURE_MAXIMUM_POSIX_MUTEXES     1
+#define CONFIGURE_POSIX_INIT_THREAD_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+  /* end of file */

diff -u /dev/null rtems/testsuites/psxtmtests/psxtmmutex02/psxtmmutex02.doc:1.1
--- /dev/null	Mon Dec  6 11:10:25 2010
+++ rtems/testsuites/psxtmtests/psxtmmutex02/psxtmmutex02.doc	Mon Dec  6 10:35:30 2010
@@ -0,0 +1,14 @@
+#
+#  $Id$
+#
+#  COPYRIGHT (c) 1989-2010.
+#  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.com/license/LICENSE.
+#
+
+This test benchmarks the following operations:
+
++ TBD

diff -u /dev/null rtems/testsuites/psxtmtests/psxtmtests_plan.csv:1.1
--- /dev/null	Mon Dec  6 11:10:25 2010
+++ rtems/testsuites/psxtmtests/psxtmtests_plan.csv	Mon Dec  6 10:35:30 2010
@@ -0,0 +1,80 @@
+"Test Case","Test","Template","Implemented"
+"pthread_mutex_init","psxtmmutex01","psxtmtest_init_destroy",
+"pthread_mutex_destroy","psxtmmutex01","psxtmtest_init_destroy",
+"pthread_mutex_lock - available","psxtmmutex03","psxtmtest_single",
+"pthread_mutex_lock - not available, block","psxtmmutex02","psxtmtest_blocking","Yes"
+"pthread_mutex_trylock - available","psxtmmutex03","psxtmtest_single",
+"pthread_mutex_trylock - not available","psxtmmutex03","psxtmtest_single",
+"pthread_mutex_unlock - no threads waiting","psxtmmutex03","psxtmtest_single",
+"pthread_mutex_unlock - thread waiting, no preempt","psxtmmutex04",,
+"pthread_mutex_unlock - thread waiting, preempt","psxtmmutex05",,
+"pthread_mutex_timedlock - available","psxtmmutex03","psxtmtest_single",
+"pthread_mutex_timedlock - not available, block","psxtmmutex06","psxtmtest_blocking",
+"pthread_mutex_setprioceiling",,,
+"pthread_mutex_getprioceiling",,,
+,,,
+"pthread_cond_init",,"psxtmtest_init_destroy",
+"pthread_cond_destroy",,"psxtmtest_init_destroy",
+"pthread_cond_signal - no threads waiting",,,
+"pthread_cond_signal - thread waiting, no preempt",,,
+"pthread_cond_signal - thread waiting, preempt",,,
+"pthread_cond_broadcast",,,
+"pthread_cond_wait - blocks",,,
+"pthread_cond_timedwait - blocks",,,
+,,,
+"pthread_create - no preempt","psxtmthread01","psxtmtest_single","Yes"
+"pthread_create - preempt","psxtmthread02","psxtmtest_single",
+"pthread_join","psxtmthread03",,
+"pthread_detach",,,
+"pthread_exit",,,
+"pthread_self",,,
+"pthread_equal",,,
+"pthread_getschedparam",,,
+"pthread_setschedparam - no thread switch",,,
+"pthread_setschedparam - lower own priority, preempt",,,
+"pthread_setschedparam - raise other priority, preempt",,,
+,,,
+"pthread_once",,,
+,,,
+"pthread_key_create",,"psxtmtest_init_destroy",
+"pthread_setspecific",,,
+"pthread_getspecific",,,
+"pthread_key_delete",,"psxtmtest_init_destroy",
+,,,
+"pthread_cancel",,,
+"pthread_setcancelstate",,,
+"pthread_setcanceltype",,,
+"pthread_testcancel",,,
+"pthread_cleanup_push",,,
+"pthread_cleanup_pop",,,
+,,,
+"pthread_getcpuclockid",,,
+,,,
+"pthread_barrier_init",,"psxtmtest_init_destroy",
+"pthread_barrier_destroy",,"psxtmtest_init_destroy",
+"pthread_barrier_wait",,,
+,,,
+"pthread_spin_init",,"psxtmtest_init_destroy",
+"pthread_spin_destroy",,"psxtmtest_init_destroy",
+"pthread_spin_lock - available",,,
+"pthread_spin_trylock - available",,,
+"pthread_spin_trylock - not available",,,
+"pthread_spin_unlock",,,
+,,,
+"pthread_rwlock_init",,"psxtmtest_init_destroy",
+"pthread_rwlock_destroy",,"psxtmtest_init_destroy",
+"pthread_rwlock_rdlock - available",,,
+"pthread_rwlock_rdlock - not available, blocks",,"psxtmtest_blocking",
+"pthread_rwlock_tryrdlock - available",,,
+"pthread_rwlock_tryrdlock - not available",,,
+"pthread_rwlock_timedrdlock - available",,,
+"pthread_rwlock_timedrdlock - not available, blocks",,"psxtmtest_blocking",
+"pthread_rwlock_unlock - no threads waiting",,,
+"pthread_rwlock_unlock - thread waiting, no preempt",,,
+"pthread_rwlock_unlock - thread waiting, preempt",,,
+"pthread_rwlock_wrlock - available",,,
+"pthread_rwlock_wrlock - not available, blocks",,"psxtmtest_blocking",
+"pthread_rwlock_trywrlock - available",,,
+"pthread_rwlock_trywrlock - not available",,,
+"pthread_rwlock_timedwrlock - available",,,
+"pthread_rwlock_timedwrlock - not available, blocks",,"psxtmtest_blocking",

diff -u /dev/null rtems/testsuites/psxtmtests/psxtmthread01/.cvsignore:1.1
--- /dev/null	Mon Dec  6 11:10:25 2010
+++ rtems/testsuites/psxtmtests/psxtmthread01/.cvsignore	Mon Dec  6 10:35:30 2010
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in

diff -u /dev/null rtems/testsuites/psxtmtests/psxtmthread01/Makefile.am:1.1
--- /dev/null	Mon Dec  6 11:10:25 2010
+++ rtems/testsuites/psxtmtests/psxtmthread01/Makefile.am	Mon Dec  6 10:35:30 2010
@@ -0,0 +1,30 @@
+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = psxtmthread01
+psxtmthread01_SOURCES = init.c ../../tmtests/include/timesys.h \
+    ../../support/src/tmtests_empty_function.c \
+    ../../support/src/tmtests_support.c
+
+dist_rtems_tests_DATA = psxtmthread01.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+OPERATION_COUNT = @OPERATION_COUNT@
+AM_CPPFLAGS += -I$(top_srcdir)/../tmtests/include
+AM_CPPFLAGS += -DOPERATION_COUNT=$(OPERATION_COUNT)
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(psxtmthread01_OBJECTS) $(psxtmthread01_LDADD)
+LINK_LIBS = $(psxtmthread01_LDLIBS)
+
+psxtmthread01$(EXEEXT): $(psxtmthread01_OBJECTS) $(psxtmthread01_DEPENDENCIES)
+	@rm -f psxtm01$(EXEEXT)
+	$(make-exe)
+
+include $(top_srcdir)/../automake/local.am

diff -u /dev/null rtems/testsuites/psxtmtests/psxtmthread01/init.c:1.1
--- /dev/null	Mon Dec  6 11:10:25 2010
+++ rtems/testsuites/psxtmtests/psxtmthread01/init.c	Mon Dec  6 10:35:30 2010
@@ -0,0 +1,71 @@
+/*
+ *  COPYRIGHT (c) 1989-2010.
+ *  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.com/license/LICENSE.
+ *
+ *  $Id$
+ */
+
+#include <coverhd.h>
+#include <tmacros.h>
+#include <timesys.h>
+#include "test_support.h"
+
+#include <pthread.h>
+
+pthread_t ThreadId;
+
+void *TestThread(
+  void *argument
+)
+{
+  return NULL;
+}
+
+
+void benchmark_pthread_create(
+  int    iteration,
+  void  *argument
+)
+{
+  int status;
+
+  status = pthread_create( &ThreadId, NULL, TestThread, NULL );
+  rtems_test_assert( !status );
+}
+
+void *POSIX_Init(
+  void *argument
+)
+{
+  puts( "\n\n*** POSIX TIME TEST THREAD 01 ***" );
+
+  rtems_time_test_measure_operation(
+    "pthread_create",
+    benchmark_pthread_create,
+    NULL,
+    1,
+    0
+  );
+
+  
+  puts( "*** END OF POSIX TIME TEST THREAD 01 ***" );
+
+  rtems_test_exit(0);
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
+
+#define CONFIGURE_MAXIMUM_POSIX_THREADS     OPERATION_COUNT + 2
+#define CONFIGURE_POSIX_INIT_THREAD_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+/* end of file */

diff -u /dev/null rtems/testsuites/psxtmtests/psxtmthread01/psxtmthread01.doc:1.1
--- /dev/null	Mon Dec  6 11:10:25 2010
+++ rtems/testsuites/psxtmtests/psxtmthread01/psxtmthread01.doc	Mon Dec  6 10:35:31 2010
@@ -0,0 +1,14 @@
+#
+#  $Id$
+#
+#  COPYRIGHT (c) 1989-2010.
+#  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.com/license/LICENSE.
+#
+
+This test benchmarks the following operations:
+
++ TBD

diff -u /dev/null rtems/testsuites/psxtmtests/psxtmthread03/.cvsignore:1.1
--- /dev/null	Mon Dec  6 11:10:25 2010
+++ rtems/testsuites/psxtmtests/psxtmthread03/.cvsignore	Mon Dec  6 10:35:31 2010
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in

diff -u /dev/null rtems/testsuites/psxtmtests/psxtmthread03/Makefile.am:1.1
--- /dev/null	Mon Dec  6 11:10:25 2010
+++ rtems/testsuites/psxtmtests/psxtmthread03/Makefile.am	Mon Dec  6 10:35:31 2010
@@ -0,0 +1,30 @@
+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = psxtmthread03
+psxtmthread03_SOURCES = init.c ../../tmtests/include/timesys.h \
+    ../../support/src/tmtests_empty_function.c \
+    ../../support/src/tmtests_support.c
+
+dist_rtems_tests_DATA = psxtmthread03.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+OPERATION_COUNT = @OPERATION_COUNT@
+AM_CPPFLAGS += -I$(top_srcdir)/../tmtests/include
+AM_CPPFLAGS += -DOPERATION_COUNT=$(OPERATION_COUNT)
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(psxtmthread03_OBJECTS) $(psxtmthread03_LDADD)
+LINK_LIBS = $(psxtmthread03_LDLIBS)
+
+psxtmthread03$(EXEEXT): $(psxtmthread03_OBJECTS) $(psxtmthread03_DEPENDENCIES)
+	@rm -f psxtmthread03$(EXEEXT)
+	$(make-exe)
+
+include $(top_srcdir)/../automake/local.am

diff -u /dev/null rtems/testsuites/psxtmtests/psxtmthread03/init.c:1.1
--- /dev/null	Mon Dec  6 11:10:26 2010
+++ rtems/testsuites/psxtmtests/psxtmthread03/init.c	Mon Dec  6 10:35:31 2010
@@ -0,0 +1,107 @@
+/*
+ *  COPYRIGHT (c) 1989-2010.
+ *  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.com/license/LICENSE.
+ *
+ *  $Id$
+ */
+
+#include <coverhd.h>
+#include <tmacros.h>
+#include <timesys.h>
+#include "test_support.h"
+#include <pthread.h>
+#include <sched.h>
+#include <rtems/timerdrv.h>
+
+void *Low(
+  void *argument
+)
+{
+  long end_time;
+
+  /*
+   * Now we have finished the thread startup overhead,
+   * so let other threads run.  When we return, we can
+   * finish the benchmark.
+   */
+  sched_yield();
+    /* let other threads run */
+
+  end_time = benchmark_timer_read();
+
+  put_time(
+    "pthread_exit",
+    end_time,
+    OPERATION_COUNT,
+    0,
+    0
+  );
+
+  puts( "*** END OF POSIX TIME TEST TM02 ***" );
+  rtems_test_exit( 0 );
+  return NULL;
+}
+
+void *Middle(
+  void *argument
+)
+{
+  /*
+   * Now we have finished the thread startup overhead,
+   * so let other threads run.  When we return, we can
+   * finish the benchmark.
+   */
+  sched_yield();
+    /* let other threads run */
+
+  pthread_exit( NULL );
+  return NULL;
+}
+
+void *POSIX_Init(
+  void *argument
+)
+{
+  int        i;
+  int        status;
+  pthread_t  threadId;
+
+  puts( "\n\n*** POSIX TIME TEST TM02 ***" );
+
+  for ( i=0 ; i < OPERATION_COUNT - 1 ; i++ ) {
+    status = pthread_create( &threadId, NULL, Middle, NULL );
+    rtems_test_assert( !status );
+  }
+  
+  status = pthread_create( &threadId, NULL, Low, NULL );
+  rtems_test_assert( !status );
+
+  /*
+   * Let the other threads start so the thread startup overhead,
+   * is accounted for.  When we return, we can start the benchmark.
+   */
+  sched_yield();
+    /* let other threads run */
+
+  /* start the timer and switch through all the other tasks */
+  benchmark_timer_initialize();
+  pthread_exit( NULL );
+  return NULL;
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
+
+#define CONFIGURE_MAXIMUM_POSIX_THREADS     OPERATION_COUNT + 2
+#define CONFIGURE_POSIX_INIT_THREAD_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+  /* end of file */

diff -u /dev/null rtems/testsuites/psxtmtests/psxtmthread03/psxtmthread03.doc:1.1
--- /dev/null	Mon Dec  6 11:10:26 2010
+++ rtems/testsuites/psxtmtests/psxtmthread03/psxtmthread03.doc	Mon Dec  6 10:35:31 2010
@@ -0,0 +1,14 @@
+#
+#  $Id$
+#
+#  COPYRIGHT (c) 1989-2010.
+#  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.com/license/LICENSE.
+#
+
+This test benchmarks the following operations:
+
++ TBD


 *joel*:
2010-12-06	Joel Sherrill <joel.sherrill at oarcorp.com>

	* README: Add initial small set of POSIX Timing Tests.

M   1.93  testsuites/tmtests/ChangeLog
M    1.3  testsuites/tmtests/README

diff -u rtems/testsuites/tmtests/ChangeLog:1.92 rtems/testsuites/tmtests/ChangeLog:1.93
--- rtems/testsuites/tmtests/ChangeLog:1.92	Thu Nov 25 07:26:45 2010
+++ rtems/testsuites/tmtests/ChangeLog	Mon Dec  6 10:35:53 2010
@@ -1,3 +1,7 @@
+2010-12-06	Joel Sherrill <joel.sherrill at oarcorp.com>
+
+	* README: Add initial small set of POSIX Timing Tests.
+
 2010-11-25	Sebastian Huber <sebastian.huber at embedded-brains.de>
 
 	* tm26/task1.c, tm27/task1.c: Update for API changes.

diff -u rtems/testsuites/tmtests/README:1.2 rtems/testsuites/tmtests/README:1.3
--- rtems/testsuites/tmtests/README:1.2	Wed May 31 12:13:49 1995
+++ rtems/testsuites/tmtests/README	Mon Dec  6 10:35:53 2010
@@ -2,11 +2,15 @@
 #  $Id$
 #
 
-This directory contains the RTEMS Timing Test Suite.
+This directory contains the RTEMS Classic API Timing Test Suite.
 The tests in this directory are used to measure the execution
 time of RTEMS directive and some critical internal functions.
-The results of these test are reported in the Fact Sheets
-and Supplental Manuals.
+The results of these test are useful for comparison of RTEMS
+performance 
+
++ between versions of RTEMS
++ between different boards 
++ across different architectures
 
 These tests attempt to benchmark RTEMS as the user would.  They measure
 the execution time for a directive (under various circumstances)


 *joel*:
2010-12-06	Joel Sherrill <joel.sherrill at oarcorp.com>

	* configure.ac: Add initial small set of POSIX Timing Tests.

M  1.174  testsuites/ChangeLog
M   1.28  testsuites/configure.ac

diff -u rtems/testsuites/ChangeLog:1.173 rtems/testsuites/ChangeLog:1.174
--- rtems/testsuites/ChangeLog:1.173	Fri Oct  1 12:00:16 2010
+++ rtems/testsuites/ChangeLog	Mon Dec  6 10:45:43 2010
@@ -1,3 +1,7 @@
+2010-12-06	Joel Sherrill <joel.sherrill at oarcorp.com>
+
+	* configure.ac: Add initial small set of POSIX Timing Tests.
+
 2010-10-01	Ralf Corsépius <ralf.corsepius at rtems.org>
 
 	PR 1708/build:

diff -u rtems/testsuites/configure.ac:1.27 rtems/testsuites/configure.ac:1.28
--- rtems/testsuites/configure.ac:1.27	Thu Jun 17 11:02:31 2010
+++ rtems/testsuites/configure.ac	Mon Dec  6 10:45:43 2010
@@ -39,7 +39,7 @@
     AC_CONFIG_SUBDIRS(mptests)
   fi
   # Now do performance tests
-  AC_CONFIG_SUBDIRS(tmtests)
+  AC_CONFIG_SUBDIRS(tmtests psxtmtests)
 fi
 
 # Explicitly list all Makefiles here



--

Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20101206/9babc521/attachment.html>


More information about the vc mailing list