<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2011-07-22)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-07-22 Ricardo Aguirre <el.mastin@ymail.com>

        PR 1847/tests
        * Makefile.am, configure.ac, psxtmtests_plan.csv: Add benchmark of
        various non-blocking semaphore operations.
        * psxtmsem02/.cvsignore, psxtmsem02/Makefile.am, psxtmsem02/init.c,
        psxtmsem02/psxtmsem02.doc: New files.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtmtests/ChangeLog.diff?r1=text&tr1=1.28&r2=text&tr2=1.29&diff_format=h">M</a></td><td width='1%'>1.29</td><td width='100%'>testsuites/psxtmtests/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtmtests/Makefile.am.diff?r1=text&tr1=1.13&r2=text&tr2=1.14&diff_format=h">M</a></td><td width='1%'>1.14</td><td width='100%'>testsuites/psxtmtests/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtmtests/configure.ac.diff?r1=text&tr1=1.16&r2=text&tr2=1.17&diff_format=h">M</a></td><td width='1%'>1.17</td><td width='100%'>testsuites/psxtmtests/configure.ac</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtmtests/psxtmsem02/.cvsignore?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/psxtmtests/psxtmsem02/.cvsignore</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtmtests/psxtmsem02/Makefile.am?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/psxtmtests/psxtmsem02/Makefile.am</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtmtests/psxtmsem02/init.c?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/psxtmtests/psxtmsem02/init.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtmtests/psxtmsem02/psxtmsem02.doc?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">testsuites/psxtmtests/psxtmsem02/psxtmsem02.doc</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtmtests/psxtmtests_plan.csv.diff?r1=text&tr1=1.15&r2=text&tr2=1.16&diff_format=h">M</a></td><td width='1%'>1.16</td><td width='100%'>testsuites/psxtmtests/psxtmtests_plan.csv</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/psxtmtests/ChangeLog:1.28 rtems/testsuites/psxtmtests/ChangeLog:1.29
--- rtems/testsuites/psxtmtests/ChangeLog:1.28  Fri Jul 22 12:05:46 2011
+++ rtems/testsuites/psxtmtests/ChangeLog       Fri Jul 22 12:22:10 2011
</font><font color='#997700'>@@ -1,5 +1,13 @@
</font> 2011-07-22        Ricardo Aguirre <el.mastin@ymail.com>
 
<font color='#000088'>+   PR 1847/tests
+       * Makefile.am, configure.ac, psxtmtests_plan.csv: Add benchmark of
+       various non-blocking semaphore operations.
+       * psxtmsem02/.cvsignore, psxtmsem02/Makefile.am, psxtmsem02/init.c,
+       psxtmsem02/psxtmsem02.doc: New files.
+
+2011-07-22     Ricardo Aguirre <el.mastin@ymail.com>
+
</font>   PR 1846/tests
        * Makefile.am, configure.ac, psxtmtests_plan.csv: Add benchmark of
        various sem_open(), sem_close(), sem_unlink(), sem_init(), and

<font color='#006600'>diff -u rtems/testsuites/psxtmtests/Makefile.am:1.13 rtems/testsuites/psxtmtests/Makefile.am:1.14
--- rtems/testsuites/psxtmtests/Makefile.am:1.13        Fri Jul 22 12:05:46 2011
+++ rtems/testsuites/psxtmtests/Makefile.am     Fri Jul 22 12:22:10 2011
</font><font color='#997700'>@@ -19,6 +19,7 @@
</font> SUBDIRS += psxtmnanosleep01
 SUBDIRS += psxtmnanosleep02
 SUBDIRS += psxtmsem01
<font color='#000088'>+SUBDIRS += psxtmsem02
</font> SUBDIRS += psxtmsleep01
 SUBDIRS += psxtmsleep02
 SUBDIRS += psxtmthread01

<font color='#006600'>diff -u rtems/testsuites/psxtmtests/configure.ac:1.16 rtems/testsuites/psxtmtests/configure.ac:1.17
--- rtems/testsuites/psxtmtests/configure.ac:1.16       Fri Jul 22 12:05:46 2011
+++ rtems/testsuites/psxtmtests/configure.ac    Fri Jul 22 12:22:10 2011
</font><font color='#997700'>@@ -91,6 +91,7 @@
</font> psxtmnanosleep01/Makefile
 psxtmnanosleep02/Makefile
 psxtmsem01/Makefile
<font color='#000088'>+psxtmsem02/Makefile
</font> psxtmsleep01/Makefile
 psxtmsleep02/Makefile
 psxtmthread01/Makefile

<font color='#006600'>diff -u /dev/null rtems/testsuites/psxtmtests/psxtmsem02/.cvsignore:1.1
--- /dev/null   Fri Jul 22 13:11:42 2011
+++ rtems/testsuites/psxtmtests/psxtmsem02/.cvsignore   Fri Jul 22 12:22:10 2011
</font><font color='#997700'>@@ -0,0 +1,2 @@
</font><font color='#000088'>+Makefile
+Makefile.in
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/psxtmtests/psxtmsem02/Makefile.am:1.1
--- /dev/null   Fri Jul 22 13:11:42 2011
+++ rtems/testsuites/psxtmtests/psxtmsem02/Makefile.am  Fri Jul 22 12:22:10 2011
</font><font color='#997700'>@@ -0,0 +1,30 @@
</font><font color='#000088'>+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = psxtmsem02
+psxtmsem02_SOURCES = init.c ../../tmtests/include/timesys.h \
+    ../../support/src/tmtests_empty_function.c \
+    ../../support/src/tmtests_support.c
+
+dist_rtems_tests_DATA = psxtmsem02.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.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 = $(psxtmsem02_OBJECTS) $(psxtmsem02_LDADD)
+LINK_LIBS = $(psxtmsem02_LDLIBS)
+
+psxtmsem02$(EXEEXT): $(psxtmsem02_OBJECTS) $(psxtmsem02_DEPENDENCIES)
+       @rm -f psxtmsem02$(EXEEXT)
+       $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/psxtmtests/psxtmsem02/init.c:1.1
--- /dev/null   Fri Jul 22 13:11:43 2011
+++ rtems/testsuites/psxtmtests/psxtmsem02/init.c       Fri Jul 22 12:22:10 2011
</font><font color='#997700'>@@ -0,0 +1,164 @@
</font><font color='#000088'>+/*
+ *  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 <errno.h>
+#include <fcntl.h>
+#include <semaphore.h>
+#include <tmacros.h>
+#include <timesys.h>
+#include <rtems/timerdrv.h>
+#include "test_support.h"
+
+sem_t           sem1;
+sem_t           *n_sem1;
+
+void benchmark_sem_getvalue(void)
+{
+  long end_time;
+  int  status;
+  int  value;
+
+  benchmark_timer_initialize();
+    status = sem_getvalue(&sem1, &value);
+  end_time = benchmark_timer_read();
+  rtems_test_assert( status == 0 );
+
+  put_time(
+    "sem_getvalue",
+    end_time,
+    1,        /* Only executed once */
+    0,
+    0
+  );
+}
+
+void benchmark_sem_wait(void)
+{
+  long end_time;
+  int  status;
+
+  benchmark_timer_initialize();
+    status = sem_wait(&sem1);
+  end_time = benchmark_timer_read();
+  rtems_test_assert( status == 0 );
+
+  put_time(
+    "sem_wait – available",
+    end_time,
+    1,        /* Only executed once */
+    0,
+    0
+  );
+}
+
+void benchmark_sem_post(void)
+{
+  long end_time;
+  int  status;
+
+  benchmark_timer_initialize();
+    status = sem_post(&sem1);
+  end_time = benchmark_timer_read();
+  rtems_test_assert( status == 0 );
+
+  put_time(
+    "sem_post - no threads waiting",
+    end_time,
+    1,        /* Only executed once */
+    0,
+    0
+  );
+}
+
+void benchmark_sem_trywait_available(void)
+{
+  long end_time;
+  int  status;
+
+  benchmark_timer_initialize();
+  status = sem_trywait(&sem1);
+  end_time = benchmark_timer_read();
+  rtems_test_assert( status == 0 );
+
+  put_time(
+    "sem_trywait - available",
+    end_time,
+    1,        /* Only executed once */
+    0,
+    0
+  );
+}
+
+void benchmark_sem_trywait_not_available(void)
+{
+  long end_time;
+  int  status;
+
+  benchmark_timer_initialize();
+    status = sem_trywait(&sem1);
+  end_time = benchmark_timer_read();
+  /*it must be non avalible, so status should be non zero*/
+  rtems_test_assert( status != 0 );
+
+  put_time(
+    "sem_trywait - not available",
+    end_time,
+    1,        /* Only executed once */
+    0,
+    0
+  );
+}
+
+void *POSIX_Init(void *argument)
+{
+  int status;
+  puts( "\n\n*** POSIX TIME TEST PSXTMSEM02 ***" );
+
+  /* create the semaphore */
+  status = sem_init( &sem1, 0, 1 );
+  rtems_test_assert( status == 0 );
+
+  /* obtain the actual semaphore value */
+  benchmark_sem_getvalue();
+  /* lock the semaphore */
+  benchmark_sem_wait();
+  /* unlock the semaphore */
+  benchmark_sem_post();
+  /* try to lock the semaphore - available */
+  benchmark_sem_trywait_available();
+  /* try to lock the semaphore, not available */
+  benchmark_sem_trywait_not_available();
+
+  puts( "*** END OF POSIX TIME TEST PSXTMSEM02 ***" );
+
+  /*Destroying the semaphore*/
+  status = sem_destroy(&sem1);
+  rtems_test_assert( status == 0 );
+
+  rtems_test_exit(0);
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
+
+#define CONFIGURE_MAXIMUM_POSIX_THREADS     1
+#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES  2
+#define CONFIGURE_POSIX_INIT_THREAD_TABLE
+
+#define CONFIGURE_INIT
+#include <rtems/confdefs.h>
+/* end of file */
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/psxtmtests/psxtmsem02/psxtmsem02.doc:1.1
--- /dev/null   Fri Jul 22 13:11:43 2011
+++ rtems/testsuites/psxtmtests/psxtmsem02/psxtmsem02.doc       Fri Jul 22 12:22:10 2011
</font><font color='#997700'>@@ -0,0 +1,19 @@
</font><font color='#000088'>+#
+#  $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:
+
++ sem_getvalue
++ sem_wait – available
++ sem_post - no threads waiting
++ sem_trywait - available_
++ sem_trywait - not available
+
</font>
<font color='#006600'>diff -u rtems/testsuites/psxtmtests/psxtmtests_plan.csv:1.15 rtems/testsuites/psxtmtests/psxtmtests_plan.csv:1.16
--- rtems/testsuites/psxtmtests/psxtmtests_plan.csv:1.15        Fri Jul 22 12:05:46 2011
+++ rtems/testsuites/psxtmtests/psxtmtests_plan.csv     Fri Jul 22 12:22:10 2011
</font><font color='#997700'>@@ -106,14 +106,14 @@
</font> "sem_unlink (does not delete)","psxtmsem01","psxtmtest_single","Yes"
 "sem_close (named second close - removes)","psxtmsem01","psxtmtest_single","Yes"
 "sem_unlink (deletes)","psxtmsem01","psxtmtest_single","Yes"
<font color='#880000'>-"sem_wait - available",,"psxtmtest_single",
</font><font color='#000088'>+"sem_wait - available","psxtmsem02","psxtmtest_single","Yes"
</font> "sem_wait - not available, block",,"psxtmtest_blocking",
<font color='#880000'>-"sem_trywait - available",,"psxtmtest_single",
-"sem_trywait - not available",,"psxtmtest_single",
-"sem_post - no threads waiting",,"psxtmtest_single",
</font><font color='#000088'>+"sem_trywait - available","psxtmsem02","psxtmtest_single","Yes"
+"sem_trywait - not available","psxtmsem02","psxtmtest_single","Yes"
+"sem_post - no threads waiting","psxtmsem02","psxtmtest_single","Yes"
</font> "sem_post - thread waiting, no preempt",,"psxtmtest_unblocking_nopreempt",
 "sem_post - thread waiting, preempt",,"psxtmtest_unblocking_preempt",
<font color='#880000'>-"sem_getvalue",,"psxtmtest_single",
</font><font color='#000088'>+"sem_getvalue","psxtmsem02","psxtmtest_single","Yes"
</font> ,,,
 "sleep - yield","psxtmsleep01","psxtmtest_single","Yes"
 "sleep - blocking","psxtmsleep02","psxtmtest_blocking","Yes"
</pre>
<p> </p>
<a name='cs2'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-07-22 Joel Sherrill <joel.sherrill@oarcorp.com>

        * psxtmmutex02/psxtmmutex02.doc, psxtmsem01/psxtmsem01.doc,
        psxtmsem02/psxtmsem02.doc, psxtmthread01/psxtmthread01.doc: Ensure
        all are correct.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtmtests/ChangeLog.diff?r1=text&tr1=1.29&r2=text&tr2=1.30&diff_format=h">M</a></td><td width='1%'>1.30</td><td width='100%'>testsuites/psxtmtests/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtmtests/psxtmmutex02/psxtmmutex02.doc.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>testsuites/psxtmtests/psxtmmutex02/psxtmmutex02.doc</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtmtests/psxtmsem01/psxtmsem01.doc.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>testsuites/psxtmtests/psxtmsem01/psxtmsem01.doc</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtmtests/psxtmsem02/psxtmsem02.doc.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>testsuites/psxtmtests/psxtmsem02/psxtmsem02.doc</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/psxtmtests/psxtmthread01/psxtmthread01.doc.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>testsuites/psxtmtests/psxtmthread01/psxtmthread01.doc</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/psxtmtests/ChangeLog:1.29 rtems/testsuites/psxtmtests/ChangeLog:1.30
--- rtems/testsuites/psxtmtests/ChangeLog:1.29  Fri Jul 22 12:22:10 2011
+++ rtems/testsuites/psxtmtests/ChangeLog       Fri Jul 22 12:28:28 2011
</font><font color='#997700'>@@ -1,3 +1,9 @@
</font><font color='#000088'>+2011-07-22    Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * psxtmmutex02/psxtmmutex02.doc, psxtmsem01/psxtmsem01.doc,
+       psxtmsem02/psxtmsem02.doc, psxtmthread01/psxtmthread01.doc: Ensure
+       all are correct.
+
</font> 2011-07-22        Ricardo Aguirre <el.mastin@ymail.com>
 
        PR 1847/tests

<font color='#006600'>diff -u rtems/testsuites/psxtmtests/psxtmmutex02/psxtmmutex02.doc:1.1 rtems/testsuites/psxtmtests/psxtmmutex02/psxtmmutex02.doc:1.2
--- rtems/testsuites/psxtmtests/psxtmmutex02/psxtmmutex02.doc:1.1       Mon Dec  6 10:35:30 2010
+++ rtems/testsuites/psxtmtests/psxtmmutex02/psxtmmutex02.doc   Fri Jul 22 12:28:28 2011
</font><font color='#997700'>@@ -11,4 +11,4 @@
</font> 
 This test benchmarks the following operations:
 
<font color='#880000'>-+ TBD
</font><font color='#000088'>++ pthread_mutex_lock - unavailable, block<span style="background-color: #FF0000"> </span>
</font>
<font color='#006600'>diff -u rtems/testsuites/psxtmtests/psxtmsem01/psxtmsem01.doc:1.1 rtems/testsuites/psxtmtests/psxtmsem01/psxtmsem01.doc:1.2
--- rtems/testsuites/psxtmtests/psxtmsem01/psxtmsem01.doc:1.1   Fri Jul 22 12:05:46 2011
+++ rtems/testsuites/psxtmtests/psxtmsem01/psxtmsem01.doc       Fri Jul 22 12:28:28 2011
</font><font color='#997700'>@@ -12,9 +12,11 @@
</font> This test benchmarks the following operations:
 
 + sem_init
<font color='#880000'>-+ sem_open (first 'O_CREAT')
-+ sem_close (first)
-+ sem_open (second 'O_EXCL')
-+ sem_close (second)
</font> + sem_destroy
<font color='#000088'>++ sem_open (first open 'O_CREAT')
++ sem_open (second open 'O_EXCL')
++ sem_close (named first/nested close)
++ sem_unlink (does not delete)
++ sem_close (named second close)
++ sem_unlink (deletes semaphore)
</font> 

<font color='#006600'>diff -u rtems/testsuites/psxtmtests/psxtmsem02/psxtmsem02.doc:1.1 rtems/testsuites/psxtmtests/psxtmsem02/psxtmsem02.doc:1.2
--- rtems/testsuites/psxtmtests/psxtmsem02/psxtmsem02.doc:1.1   Fri Jul 22 12:22:10 2011
+++ rtems/testsuites/psxtmtests/psxtmsem02/psxtmsem02.doc       Fri Jul 22 12:28:28 2011
</font><font color='#997700'>@@ -14,6 +14,6 @@
</font> + sem_getvalue
 + sem_wait – available
 + sem_post - no threads waiting
<font color='#880000'>-+ sem_trywait - available_
</font><font color='#000088'>++ sem_trywait - available
</font> + sem_trywait - not available
 

<font color='#006600'>diff -u rtems/testsuites/psxtmtests/psxtmthread01/psxtmthread01.doc:1.1 rtems/testsuites/psxtmtests/psxtmthread01/psxtmthread01.doc:1.2
--- rtems/testsuites/psxtmtests/psxtmthread01/psxtmthread01.doc:1.1     Mon Dec  6 10:35:31 2010
+++ rtems/testsuites/psxtmtests/psxtmthread01/psxtmthread01.doc Fri Jul 22 12:28:28 2011
</font><font color='#997700'>@@ -11,4 +11,4 @@
</font> 
 This test benchmarks the following operations:
 
<font color='#880000'>-+ TBD
</font><font color='#000088'>++ pthread_create
</font></pre>
<p> </p>

<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>