<!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 (2010-06-21)</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>2010-06-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac: Add test for deferring free() from ISR and
for deferred free() processing.
* malloc02/.cvsignore, malloc02/Makefile.am, malloc02/init.c,
malloc02/malloc02.doc, malloc02/malloc02.scn: New files.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/ChangeLog.diff?r1=text&tr1=1.178&r2=text&tr2=1.179&diff_format=h">M</a></td><td width='1%'>1.179</td><td width='100%'>testsuites/libtests/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/Makefile.am.diff?r1=text&tr1=1.26&r2=text&tr2=1.27&diff_format=h">M</a></td><td width='1%'>1.27</td><td width='100%'>testsuites/libtests/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/configure.ac.diff?r1=text&tr1=1.33&r2=text&tr2=1.34&diff_format=h">M</a></td><td width='1%'>1.34</td><td width='100%'>testsuites/libtests/configure.ac</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/malloc02/.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/libtests/malloc02/.cvsignore</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/malloc02/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/libtests/malloc02/Makefile.am</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/malloc02/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/libtests/malloc02/init.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/malloc02/malloc02.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/libtests/malloc02/malloc02.doc</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/malloc02/malloc02.scn?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/libtests/malloc02/malloc02.scn</font></td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/libtests/ChangeLog:1.178 rtems/testsuites/libtests/ChangeLog:1.179
--- rtems/testsuites/libtests/ChangeLog:1.178 Mon Jun 7 13:33:09 2010
+++ rtems/testsuites/libtests/ChangeLog Mon Jun 21 15:05:42 2010
</font><font color='#997700'>@@ -1,3 +1,10 @@
</font><font color='#000088'>+2010-06-21 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * Makefile.am, configure.ac: Add test for deferring free() from ISR and
+ for deferred free() processing.
+ * malloc02/.cvsignore, malloc02/Makefile.am, malloc02/init.c,
+ malloc02/malloc02.doc, malloc02/malloc02.scn: New files.
+
</font> 2010-06-07 Joel Sherrill <joel.sherrill@oarcorp.com>
* termios01/init.c, termios01/termios01.scn, termios02/init.c,
<font color='#006600'>diff -u rtems/testsuites/libtests/Makefile.am:1.26 rtems/testsuites/libtests/Makefile.am:1.27
--- rtems/testsuites/libtests/Makefile.am:1.26 Fri Apr 30 23:20:27 2010
+++ rtems/testsuites/libtests/Makefile.am Mon Jun 21 15:05:43 2010
</font><font color='#997700'>@@ -6,7 +6,7 @@
</font>
SUBDIRS = POSIX
<font color='#880000'>-SUBDIRS += bspcmdline01 cpuuse malloctest heapwalk putenvtest monitor \
</font><font color='#000088'>+SUBDIRS += bspcmdline01 cpuuse malloctest malloc02 heapwalk putenvtest monitor \
</font> monitor02 rtmonuse stackchk stackchk01 termios termios01 termios02 \
rtems++ tztest block01 block02 block03 block04 block05 block06 block07 \
block08 block09 block10 stringto01
<font color='#006600'>diff -u rtems/testsuites/libtests/configure.ac:1.33 rtems/testsuites/libtests/configure.ac:1.34
--- rtems/testsuites/libtests/configure.ac:1.33 Tue Jan 26 09:09:02 2010
+++ rtems/testsuites/libtests/configure.ac Mon Jun 21 15:05:45 2010
</font><font color='#997700'>@@ -47,6 +47,7 @@
</font> cpuuse/Makefile
heapwalk/Makefile
malloctest/Makefile
<font color='#000088'>+malloc02/Makefile
</font> monitor/Makefile
monitor02/Makefile
putenvtest/Makefile
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/malloc02/.cvsignore:1.1
--- /dev/null Mon Jun 21 15:11:48 2010
+++ rtems/testsuites/libtests/malloc02/.cvsignore Mon Jun 21 15:05:45 2010
</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/libtests/malloc02/Makefile.am:1.1
--- /dev/null Mon Jun 21 15:11:48 2010
+++ rtems/testsuites/libtests/malloc02/Makefile.am Mon Jun 21 15:05:45 2010
</font><font color='#997700'>@@ -0,0 +1,26 @@
</font><font color='#000088'>+##
+## $Id$
+##
+
+MANAGERS = all
+
+rtems_tests_PROGRAMS = malloc02
+malloc02_SOURCES = init.c ../../support/src/spin.c
+
+dist_rtems_tests_DATA = malloc02.scn
+dist_rtems_tests_DATA += malloc02.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(malloc02_OBJECTS) $(malloc02_LDADD)
+LINK_LIBS = $(malloc02_LDLIBS)
+
+malloc02$(EXEEXT): $(malloc02_OBJECTS) $(malloc02_DEPENDENCIES)
+ @rm -f malloc02$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/malloc02/init.c:1.1
--- /dev/null Mon Jun 21 15:11:48 2010
+++ rtems/testsuites/libtests/malloc02/init.c Mon Jun 21 15:05:45 2010
</font><font color='#997700'>@@ -0,0 +1,95 @@
</font><font color='#000088'>+/*
+ * COPYRIGHT (c) 1989-2009.
+ * 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 <tmacros.h>
+
+volatile bool operation_performed_from_tsr;
+
+void *Pointer1;
+
+rtems_timer_service_routine test_operation_from_isr(
+ rtems_id timer,
+ void *arg
+)
+{
+ /* free memory from ISR so it is deferred */
+ free( Pointer1 );
+
+ operation_performed_from_tsr = true;
+}
+
+rtems_task Init(
+ rtems_task_argument argument
+)
+{
+ rtems_status_code status;
+ rtems_id timer;
+ void *pointer2;
+
+ puts( "\n\n*** TEST MALLOC 02 ***" );
+
+ puts( "malloc memory to free from ISR" );
+ Pointer1 = malloc( 20 );
+
+ /*
+ * Timer used in multiple ways
+ */
+ status = rtems_timer_create( rtems_build_name('T', 'M', 'R', '0'), &timer );
+ directive_failed( status, "rtems_timer_create" );
+
+ operation_performed_from_tsr = false;
+
+ /*
+ * Test Operation from ISR
+ */
+ status = rtems_timer_fire_after( timer, 10, test_operation_from_isr, NULL );
+ directive_failed( status, "timer_fire_after failed" );
+
+ /* XXX pick a delay method */
+#if 0
+ status = rtems_task_wake_after( 20 );
+#else
+ {
+ rtems_interval start;
+ rtems_interval now;
+ start = rtems_clock_get_ticks_since_boot();
+ do {
+ now = rtems_clock_get_ticks_since_boot();
+ } while ( (now-start) < 100 );
+ }
+#endif
+ if ( !operation_performed_from_tsr ) {
+ puts( "Operation from ISR did not get processed\n" );
+ rtems_test_exit( 0 );
+ }
+
+ puts( "Free from ISR successfully processed" );
+ puts( "Now malloc'ing more memory to process the free" );
+ pointer2 = malloc(20);
+
+ puts( "*** END OF TEST MALLOC 02 ***" );
+ rtems_test_exit( 0 );
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+#define CONFIGURE_MAXIMUM_TIMERS 1
+
+#define CONFIGURE_INIT
+#include <rtems/confdefs.h>
+/* end of file */
+
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/malloc02/malloc02.doc:1.1
--- /dev/null Mon Jun 21 15:11:49 2010
+++ rtems/testsuites/libtests/malloc02/malloc02.doc Mon Jun 21 15:05:45 2010
</font><font color='#997700'>@@ -0,0 +1,24 @@
</font><font color='#000088'>+#
+# $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 file describes the directives and concepts tested by this test set.
+
+test set name: malloc02
+
+directives:
+
+ + free from ISR which is deferred
+ + malloc - deferred reclamation
+
+concepts:
+
++ adding to the deferred free operation chain
++ processing the deferred free operation chain
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/libtests/malloc02/malloc02.scn:1.1
--- /dev/null Mon Jun 21 15:11:49 2010
+++ rtems/testsuites/libtests/malloc02/malloc02.scn Mon Jun 21 15:05:46 2010
</font><font color='#997700'>@@ -0,0 +1,5 @@
</font><font color='#000088'>+*** TEST MALLOC 02 ***
+malloc memory to free from ISR
+Free from ISR successfully processed
+Now malloc'ing more memory to process the free
+*** END OF TEST MALLOC 02 ***
</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>