change log for rtems (2011-07-29)
rtems-vc at rtems.org
rtems-vc at rtems.org
Fri Jul 29 17:11:02 UTC 2011
*joel*:
2011-07-29 Ricardo Aguirre <el.mastin at ymail.com>
PR 1863/tests
* Makefile.am, configure.ac, psxtmtests_plan.csv: Add benchmark of
pthread_barrier_wait - releasing, no preempt
* psxtmbarrier03/.cvsignore, psxtmbarrier03/Makefile.am,
psxtmbarrier03/init.c, psxtmbarrier03/psxtmbarrier03.doc: New files.
M 1.37 testsuites/psxtmtests/ChangeLog
M 1.20 testsuites/psxtmtests/Makefile.am
M 1.23 testsuites/psxtmtests/configure.ac
A 1.1 testsuites/psxtmtests/psxtmbarrier03/.cvsignore
A 1.1 testsuites/psxtmtests/psxtmbarrier03/Makefile.am
A 1.1 testsuites/psxtmtests/psxtmbarrier03/init.c
A 1.1 testsuites/psxtmtests/psxtmbarrier03/psxtmbarrier03.doc
M 1.22 testsuites/psxtmtests/psxtmtests_plan.csv
diff -u rtems/testsuites/psxtmtests/ChangeLog:1.36 rtems/testsuites/psxtmtests/ChangeLog:1.37
--- rtems/testsuites/psxtmtests/ChangeLog:1.36 Fri Jul 29 10:08:20 2011
+++ rtems/testsuites/psxtmtests/ChangeLog Fri Jul 29 11:54:32 2011
@@ -1,5 +1,13 @@
2011-07-29 Ricardo Aguirre <el.mastin at ymail.com>
+ PR 1863/tests
+ * Makefile.am, configure.ac, psxtmtests_plan.csv: Add benchmark of
+ pthread_barrier_wait - releasing, no preempt
+ * psxtmbarrier03/.cvsignore, psxtmbarrier03/Makefile.am,
+ psxtmbarrier03/init.c, psxtmbarrier03/psxtmbarrier03.doc: New files.
+
+2011-07-29 Ricardo Aguirre <el.mastin at ymail.com>
+
PR 1859/tests
* Makefile.am, configure.ac, psxtmtests_plan.csv: Add benchmark of
pthread_barrier_wait - blocking
diff -u rtems/testsuites/psxtmtests/Makefile.am:1.19 rtems/testsuites/psxtmtests/Makefile.am:1.20
--- rtems/testsuites/psxtmtests/Makefile.am:1.19 Fri Jul 29 10:08:20 2011
+++ rtems/testsuites/psxtmtests/Makefile.am Fri Jul 29 11:54:32 2011
@@ -9,6 +9,7 @@
if HAS_POSIX
SUBDIRS += psxtmbarrier01
SUBDIRS += psxtmbarrier02
+SUBDIRS += psxtmbarrier03
SUBDIRS += psxtmkey01
SUBDIRS += psxtmkey02
SUBDIRS += psxtmmutex01
diff -u rtems/testsuites/psxtmtests/configure.ac:1.22 rtems/testsuites/psxtmtests/configure.ac:1.23
--- rtems/testsuites/psxtmtests/configure.ac:1.22 Fri Jul 29 10:08:20 2011
+++ rtems/testsuites/psxtmtests/configure.ac Fri Jul 29 11:54:32 2011
@@ -81,6 +81,7 @@
AC_CONFIG_FILES([Makefile
psxtmbarrier01/Makefile
psxtmbarrier02/Makefile
+psxtmbarrier03/Makefile
psxtmkey01/Makefile
psxtmkey02/Makefile
psxtmmutex01/Makefile
diff -u /dev/null rtems/testsuites/psxtmtests/psxtmbarrier03/.cvsignore:1.1
--- /dev/null Fri Jul 29 12:11:01 2011
+++ rtems/testsuites/psxtmtests/psxtmbarrier03/.cvsignore Fri Jul 29 11:54:32 2011
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff -u /dev/null rtems/testsuites/psxtmtests/psxtmbarrier03/Makefile.am:1.1
--- /dev/null Fri Jul 29 12:11:01 2011
+++ rtems/testsuites/psxtmtests/psxtmbarrier03/Makefile.am Fri Jul 29 11:54:32 2011
@@ -0,0 +1,30 @@
+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = psxtmbarrier03
+psxtmbarrier03_SOURCES = init.c ../../tmtests/include/timesys.h \
+ ../../support/src/tmtests_empty_function.c \
+ ../../support/src/tmtests_support.c
+
+dist_rtems_tests_DATA = psxtmbarrier03.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 = $(psxtmbarrier03_OBJECTS) $(psxtmbarrier03_LDADD)
+LINK_LIBS = $(psxtmbarrier03_LDLIBS)
+
+psxtmbarrier03$(EXEEXT): $(psxtmbarrier03_OBJECTS) $(psxtmbarrier03_DEPENDENCIES)
+ @rm -f psxtmbarrier03$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff -u /dev/null rtems/testsuites/psxtmtests/psxtmbarrier03/init.c:1.1
--- /dev/null Fri Jul 29 12:11:01 2011
+++ rtems/testsuites/psxtmtests/psxtmbarrier03/init.c Fri Jul 29 11:54:32 2011
@@ -0,0 +1,103 @@
+/*
+ * COPYRIGHT (c) 1989-2011.
+ * 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$
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <coverhd.h>
+#include <tmacros.h>
+#include <timesys.h>
+#include "test_support.h"
+#include <pthread.h>
+#include <sched.h>
+#include <rtems/timerdrv.h>
+
+#define N 2
+pthread_barrier_t barrier;
+
+void *Blocker(
+ void *argument
+)
+{
+ (void) pthread_barrier_wait( &barrier );
+ rtems_test_assert( FALSE );
+ return NULL;
+}
+
+void *POSIX_Init(
+ void *argument
+)
+{
+ int status;
+ pthread_t threadId;
+ long end_time;
+
+ puts( "\n\n*** POSIX TIME TEST PSXTMBARRIER 03 ***" );
+
+ status = pthread_create( &threadId, NULL, Blocker, NULL );
+ rtems_test_assert( status == 0 );
+
+ /*
+ * Deliberately create the barrier after the threads. This way if the
+ * threads do run before we intend, they will get an error.
+ * The barrier will be released on the Nth thread blocking.
+ */
+ status = pthread_barrier_init( &barrier, NULL, N );
+ rtems_test_assert( status == 0 );
+
+ /*
+ * Let the other thread start so the thread startup overhead,
+ * is accounted for. When we return, we can start the benchmark.
+ */
+ sched_yield();
+ /* let other thread run */
+
+ /*
+ * Because this is the Nth thread at the barrier, this is an
+ * unblocking operation.
+ */
+ benchmark_timer_initialize();
+ status = pthread_barrier_wait( &barrier );
+ end_time = benchmark_timer_read();
+ /*
+ * Upon successful completion return value, the status should be
+ * PTHREAD_BARRIER_SERIAL_THREAD.
+ */
+ rtems_test_assert( status == PTHREAD_BARRIER_SERIAL_THREAD );
+
+ put_time(
+ "pthread_barrier_wait – releasing, no preempt",
+ end_time,
+ 1,
+ 0,
+ 0
+ );
+
+ puts( "*** END OF POSIX TIME TEST PSXTMBARRIER 03 ***" );
+ rtems_test_exit( 0 );
+
+ return NULL;
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
+
+#define CONFIGURE_MAXIMUM_POSIX_THREADS 2
+#define CONFIGURE_MAXIMUM_POSIX_BARRIERS 1
+#define CONFIGURE_POSIX_INIT_THREAD_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+/* end of file */
diff -u /dev/null rtems/testsuites/psxtmtests/psxtmbarrier03/psxtmbarrier03.doc:1.1
--- /dev/null Fri Jul 29 12:11:01 2011
+++ rtems/testsuites/psxtmtests/psxtmbarrier03/psxtmbarrier03.doc Fri Jul 29 11:54:32 2011
@@ -0,0 +1,14 @@
+#
+# $Id$
+#
+# COPYRIGHT (c) 1989-2011.
+# 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:
+
++ pthread_barrier_wait – releasing, no preempt
diff -u rtems/testsuites/psxtmtests/psxtmtests_plan.csv:1.21 rtems/testsuites/psxtmtests/psxtmtests_plan.csv:1.22
--- rtems/testsuites/psxtmtests/psxtmtests_plan.csv:1.21 Fri Jul 29 10:08:20 2011
+++ rtems/testsuites/psxtmtests/psxtmtests_plan.csv Fri Jul 29 11:54:32 2011
@@ -53,7 +53,7 @@
"pthread_barrier_init","psxtmbarrier01","psxtmtest_init_destroy","Yes"
"pthread_barrier_destroy","psxtmbarrier01","psxtmtest_init_destroy","Yes"
"pthread_barrier_wait - blocking","psxtmbarrier02","psxtmtest_blocking","Yes"
-"pthread_barrier_wait - releasing, no preempt","psxtmbarrier03","psxtmtest_unblocking_nopreempt",
+"pthread_barrier_wait - releasing, no preempt","psxtmbarrier03","psxtmtest_unblocking_nopreempt","Yes"
"pthread_barrier_wait - releasing, preempt","psxtmbarrier04","psxtmtest_unblocking_preempt",
,,,
"pthread_spin_init",,"psxtmtest_init_destroy",
--
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/20110729/9f5c8bc3/attachment-0001.html>
More information about the vc
mailing list