<!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-08-10)</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-08-10 Joel Sherrill <joel.sherrill@oarcorp.com>

        PR 1661/testing
        * libcsupport/Makefile.am, libcsupport/include/rtems/libcsupport.h: Add
        public methods to get/set malloc heap pointer so the tests do not
        have to peer behind the API.
        * libcsupport/src/mallocgetheapptr.c,
        libcsupport/src/mallocsetheapptr.c: New files.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2556&r2=text&tr2=1.2557&diff_format=h">M</a></td><td width='1%'>1.2557</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/Makefile.am.diff?r1=text&tr1=1.130&r2=text&tr2=1.131&diff_format=h">M</a></td><td width='1%'>1.131</td><td width='100%'>cpukit/libcsupport/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/include/rtems/libcsupport.h.diff?r1=text&tr1=1.25&r2=text&tr2=1.26&diff_format=h">M</a></td><td width='1%'>1.26</td><td width='100%'>cpukit/libcsupport/include/rtems/libcsupport.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/mallocgetheapptr.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">cpukit/libcsupport/src/mallocgetheapptr.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/mallocsetheapptr.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">cpukit/libcsupport/src/mallocsetheapptr.c</font></td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2556 rtems/cpukit/ChangeLog:1.2557
--- rtems/cpukit/ChangeLog:1.2556       Mon Aug  9 04:16:08 2010
+++ rtems/cpukit/ChangeLog      Tue Aug 10 08:15:30 2010
</font><font color='#997700'>@@ -1,3 +1,12 @@
</font><font color='#000088'>+2010-08-10    Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       PR 1661/testing
+       * libcsupport/Makefile.am, libcsupport/include/rtems/libcsupport.h: Add
+       public methods to get/set malloc heap pointer so the tests do not
+       have to peer behind the API.
+       * libcsupport/src/mallocgetheapptr.c,
+       libcsupport/src/mallocsetheapptr.c: New files.
+
</font> 2010-08-09        Sebastian Huber <sebastian.huber@embedded-brains.de>
 
        * score/inline/rtems/score/object.inl: Use attribute unused in

<font color='#006600'>diff -u rtems/cpukit/libcsupport/Makefile.am:1.130 rtems/cpukit/libcsupport/Makefile.am:1.131
--- rtems/cpukit/libcsupport/Makefile.am:1.130  Tue Aug  3 10:46:51 2010
+++ rtems/cpukit/libcsupport/Makefile.am        Tue Aug 10 08:15:30 2010
</font><font color='#997700'>@@ -92,6 +92,7 @@
</font>     src/realloc.c src/_calloc_r.c src/_malloc_r.c \
     src/free.c src/freenode.c src/_free_r.c \
     src/_realloc_r.c src/mallocfreespace.c \
<font color='#000088'>+   src/mallocgetheapptr.c src/mallocsetheapptr.c \
</font>     src/mallocinfo.c src/malloc_walk.c src/malloc_get_statistics.c \
     src/malloc_report_statistics.c src/malloc_report_statistics_plugin.c \
     src/malloc_statistics_helpers.c src/posix_memalign.c \

<font color='#006600'>diff -u rtems/cpukit/libcsupport/include/rtems/libcsupport.h:1.25 rtems/cpukit/libcsupport/include/rtems/libcsupport.h:1.26
--- rtems/cpukit/libcsupport/include/rtems/libcsupport.h:1.25   Wed Oct 14 11:13:05 2009
+++ rtems/cpukit/libcsupport/include/rtems/libcsupport.h        Tue Aug 10 08:15:30 2010
</font><font color='#997700'>@@ -35,6 +35,8 @@
</font> 
 extern void malloc_dump(void);
 extern void malloc_walk(size_t source, size_t printf_enabled);
<font color='#000088'>+void malloc_set_heap_pointer(Heap_Control *new_heap);
+Heap_Control *malloc_get_heap_pointer( void );
</font> extern void libc_init(void);
 extern int  host_errno(void);
 extern void fix_syscall_errno(void);

<font color='#006600'>diff -u /dev/null rtems/cpukit/libcsupport/src/mallocgetheapptr.c:1.1
--- /dev/null   Tue Aug 10 09:11:34 2010
+++ rtems/cpukit/libcsupport/src/mallocgetheapptr.c     Tue Aug 10 08:15:30 2010
</font><font color='#997700'>@@ -0,0 +1,26 @@
</font><font color='#000088'>+/*
+ *  RTEMS Malloc Get Heap Pointer -- Primarily for Debug
+ *
+ *  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$
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
+#include <rtems.h>
+#include <rtems/libcsupport.h>
+#include "malloc_p.h"
+
+Heap_Control *malloc_get_heap_pointer( void )
+{
+  return RTEMS_Malloc_Heap;
+}
</font>
<font color='#006600'>diff -u /dev/null rtems/cpukit/libcsupport/src/mallocsetheapptr.c:1.1
--- /dev/null   Tue Aug 10 09:11:34 2010
+++ rtems/cpukit/libcsupport/src/mallocsetheapptr.c     Tue Aug 10 08:15:30 2010
</font><font color='#997700'>@@ -0,0 +1,28 @@
</font><font color='#000088'>+/*
+ *  RTEMS Malloc Set Heap Pointer -- Primarily for Debug
+ *
+ *  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$
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
+#include <rtems.h>
+#include <rtems/libcsupport.h>
+#include "malloc_p.h"
+
+void malloc_set_heap_pointer(
+  Heap_Control *new_heap
+)
+{
+  RTEMS_Malloc_Heap = new_heap;
+}
</font></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>2010-08-10 Joel Sherrill <joel.sherrill@oarcorp.com>

        PR 1661/testing
        * malloc04/init.c: Add public methods to get/set malloc heap pointer so
        the tests do not have to peer behind the API.
</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.233&r2=text&tr2=1.234&diff_format=h">M</a></td><td width='1%'>1.234</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/malloc04/init.c.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>testsuites/libtests/malloc04/init.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/libtests/ChangeLog:1.233 rtems/testsuites/libtests/ChangeLog:1.234
--- rtems/testsuites/libtests/ChangeLog:1.233   Mon Aug  9 09:36:47 2010
+++ rtems/testsuites/libtests/ChangeLog Tue Aug 10 08:15:38 2010
</font><font color='#997700'>@@ -1,3 +1,9 @@
</font><font color='#000088'>+2010-08-10    Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       PR 1661/testing
+       * malloc04/init.c: Add public methods to get/set malloc heap pointer so
+       the tests do not have to peer behind the API.
+
</font> 2010-08-09        Bharath Suri <bharath.s.jois@gmail.com>
 
        PR 1661/testing

<font color='#006600'>diff -u rtems/testsuites/libtests/malloc04/init.c:1.2 rtems/testsuites/libtests/malloc04/init.c:1.3
--- rtems/testsuites/libtests/malloc04/init.c:1.2       Wed Jul 14 18:23:12 2010
+++ rtems/testsuites/libtests/malloc04/init.c   Tue Aug 10 08:15:38 2010
</font><font color='#997700'>@@ -15,15 +15,26 @@
</font> #include <rtems/malloc.h>
 #include <errno.h>
 
<font color='#000088'>+/* configuration information */
+/* At top of file to have access to configuration variables */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS             1
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+#include <rtems/confdefs.h>
+/* end of configuration */
+
</font> char Malloc_Heap[ 128 ] CPU_STRUCTURE_ALIGNMENT;
 int sbrk_count;
 Heap_Control Heap_Holder;
<font color='#000088'>+Heap_Control TempHeap;
</font> 
 /* Heap variables we need to peek and poke at */
<font color='#880000'>-extern Heap_Control *RTEMS_Malloc_Heap;
</font> extern size_t  RTEMS_Malloc_Sbrk_amount;
<font color='#880000'>-extern rtems_malloc_sbrk_functions_t *rtems_malloc_sbrk_helpers;
-extern rtems_malloc_sbrk_functions_t  rtems_malloc_sbrk_helpers_table;
</font> 
 size_t offset;
 
<font color='#997700'>@@ -52,6 +63,7 @@
</font> )
 {
   void *p1, *p2, *p3, *p4;
<font color='#000088'>+  Heap_Control *TempHeap;
</font> 
   sbrk_count = 0;
   offset     = 0;
<font color='#997700'>@@ -59,7 +71,8 @@
</font>   puts( "\n\n*** TEST MALLOC 04 ***" );
 
   /* Safe information on real heap */
<font color='#880000'>-  Heap_Holder = *RTEMS_Malloc_Heap;
</font><font color='#000088'>+  TempHeap = malloc_get_heap_pointer();
+  Heap_Holder = *TempHeap;
</font>   rtems_malloc_sbrk_helpers = &rtems_malloc_sbrk_helpers_table;
 
   puts( "Initialize heap with some memory" );
<font color='#997700'>@@ -112,7 +125,7 @@
</font>   p4 = malloc(48);
 
   /* Restore information on real heap */
<font color='#880000'>-  *RTEMS_Malloc_Heap = Heap_Holder;
</font><font color='#000088'>+  malloc_set_heap_pointer( TempHeap );
</font>   rtems_malloc_sbrk_helpers = NULL;
 
   puts( "*** END OF TEST MALLOC 04 ***" );
<font color='#997700'>@@ -120,15 +133,4 @@
</font>   rtems_test_exit(0);
 }
 
<font color='#880000'>-/* configuration information */
-
-#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
-#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
-
-#define CONFIGURE_MAXIMUM_TASKS             1
-#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
-
-#define CONFIGURE_INIT
-
-#include <rtems/confdefs.h>
</font> /* end of file */
</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>