<!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>
<font color='#225522'><em>(on branch rtems-4-10-branch)</em></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-06-21 Joel Sherrill <joel.sherrilL@OARcorp.com>
PR 1559/misc
Coverity Id 16
* libmisc/monitor/mon-editor.c: Fix buffer overflow.
</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.2443&r2=text&tr2=1.2444&diff_format=h">M</a></td><td width='1%'>1.2444</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2346.2.41&r2=text&tr2=1.2346.2.42&diff_format=h">M</a></td><td width='1%'>1.2346.2.42</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/monitor/mon-editor.c.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>cpukit/libmisc/monitor/mon-editor.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libmisc/monitor/mon-editor.c.diff?r1=text&tr1=1.4&r2=text&tr2=1.4.2.1&diff_format=h">M</a></td><td width='1%'>1.4.2.1</td><td width='100%'>cpukit/libmisc/monitor/mon-editor.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2443 rtems/cpukit/ChangeLog:1.2444
--- rtems/cpukit/ChangeLog:1.2443 Sun Jun 20 14:41:32 2010
+++ rtems/cpukit/ChangeLog Mon Jun 21 11:25:08 2010
</font><font color='#997700'>@@ -1,3 +1,9 @@
</font><font color='#000088'>+2010-06-21 Joel Sherrill <joel.sherrilL@OARcorp.com>
+
+ PR 1559/misc
+ Coverity Id 16
+ * libmisc/monitor/mon-editor.c: Fix buffer overflow.
+
</font> 2010-06-20 Joel Sherrill <joel.sherrill@oarcorp.com>
* sapi/include/confdefs.h: Add parameters for FIFOs and pipes since
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2346.2.41 rtems/cpukit/ChangeLog:1.2346.2.42
--- rtems/cpukit/ChangeLog:1.2346.2.41 Fri Jun 18 08:29:29 2010
+++ rtems/cpukit/ChangeLog Mon Jun 21 11:25:20 2010
</font><font color='#997700'>@@ -1,3 +1,9 @@
</font><font color='#000088'>+2010-06-21 Joel Sherrill <joel.sherrilL@OARcorp.com>
+
+ PR 1559/misc
+ Coverity Id 16
+ * libmisc/monitor/mon-editor.c: Fix buffer overflow.
+
</font> 2010-06-18 Ralf Corsépius <ralf.corsepius@rtems.org>
* rtems/include/rtems/rtems/object.h,
<font color='#006600'>diff -u rtems/cpukit/libmisc/monitor/mon-editor.c:1.4 rtems/cpukit/libmisc/monitor/mon-editor.c:1.5
--- rtems/cpukit/libmisc/monitor/mon-editor.c:1.4 Sun Nov 29 06:12:39 2009
+++ rtems/cpukit/libmisc/monitor/mon-editor.c Mon Jun 21 11:25:09 2010
</font><font color='#997700'>@@ -428,7 +428,7 @@
</font> if ((pos < end) && (end < RTEMS_COMMAND_BUFFER_SIZE))
{
int ch, bs;
<font color='#880000'>- for (ch = end + 1; ch > pos; ch--)
</font><font color='#000088'>+ for (ch = end; ch > pos; ch--)
</font> buffer[ch] = buffer[ch - 1];
fprintf(stdout,buffer + pos);
for (bs = 0; bs < (end - pos + 1); bs++)
<font color='#006600'>diff -u rtems/cpukit/libmisc/monitor/mon-editor.c:1.4 rtems/cpukit/libmisc/monitor/mon-editor.c:1.4.2.1
--- rtems/cpukit/libmisc/monitor/mon-editor.c:1.4 Sun Nov 29 06:12:39 2009
+++ rtems/cpukit/libmisc/monitor/mon-editor.c Mon Jun 21 11:25:20 2010
</font><font color='#997700'>@@ -428,7 +428,7 @@
</font> if ((pos < end) && (end < RTEMS_COMMAND_BUFFER_SIZE))
{
int ch, bs;
<font color='#880000'>- for (ch = end + 1; ch > pos; ch--)
</font><font color='#000088'>+ for (ch = end; ch > pos; ch--)
</font> buffer[ch] = buffer[ch - 1];
fprintf(stdout,buffer + pos);
for (bs = 0; bs < (end - pos + 1); bs++)
</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>
<font color='#225522'><em>(on branch rtems-4-10-branch)</em></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-06-21 Joel Sherrill <joel.sherrilL@OARcorp.com>
PR 1554/cpukit
Coverity Id 17
* libi2c/libi2c.c: Fix memory leak on error.
</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.1539.2.63&r2=text&tr2=1.1539.2.64&diff_format=h">M</a></td><td width='1%'>1.1539.2.64</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2346.2.42&r2=text&tr2=1.2346.2.43&diff_format=h">M</a></td><td width='1%'>1.2346.2.43</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libi2c/libi2c.c.diff?r1=text&tr1=1.11.2.1&r2=text&tr2=1.11.2.2&diff_format=h">M</a></td><td width='1%'>1.11.2.2</td><td width='100%'>cpukit/libi2c/libi2c.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libi2c/libi2c.c.diff?r1=text&tr1=1.16&r2=text&tr2=1.16.2.1&diff_format=h">M</a></td><td width='1%'>1.16.2.1</td><td width='100%'>cpukit/libi2c/libi2c.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.1539.2.63 rtems/cpukit/ChangeLog:1.1539.2.64
--- rtems/cpukit/ChangeLog:1.1539.2.63 Tue Mar 16 16:28:06 2010
+++ rtems/cpukit/ChangeLog Mon Jun 21 11:27:22 2010
</font><font color='#997700'>@@ -1,3 +1,9 @@
</font><font color='#000088'>+2010-06-21 Joel Sherrill <joel.sherrilL@OARcorp.com>
+
+ PR 1554/cpukit
+ Coverity Id 17
+ * libi2c/libi2c.c: Fix memory leak on error.
+
</font> 2010-03-17 Chris Johns <chrisj@rtems.org>
* libfs/src/dosfs/msdos_create.c: Fix the date/time call order to
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2346.2.42 rtems/cpukit/ChangeLog:1.2346.2.43
--- rtems/cpukit/ChangeLog:1.2346.2.42 Mon Jun 21 11:25:20 2010
+++ rtems/cpukit/ChangeLog Mon Jun 21 11:27:11 2010
</font><font color='#997700'>@@ -1,5 +1,11 @@
</font> 2010-06-21 Joel Sherrill <joel.sherrilL@OARcorp.com>
<font color='#000088'>+ PR 1554/cpukit
+ Coverity Id 17
+ * libi2c/libi2c.c: Fix memory leak on error.
+
+2010-06-21 Joel Sherrill <joel.sherrilL@OARcorp.com>
+
</font> PR 1559/misc
Coverity Id 16
* libmisc/monitor/mon-editor.c: Fix buffer overflow.
<font color='#006600'>diff -u rtems/cpukit/libi2c/libi2c.c:1.11.2.1 rtems/cpukit/libi2c/libi2c.c:1.11.2.2
--- rtems/cpukit/libi2c/libi2c.c:1.11.2.1 Wed Sep 24 09:31:37 2008
+++ rtems/cpukit/libi2c/libi2c.c Mon Jun 21 11:27:23 2010
</font><font color='#997700'>@@ -395,11 +395,13 @@
</font> /* check */
if ('/' != *nmcpy) {
safe_printf ( DRVNM "Bad name: must be an absolute path starting with '/'\n");
<font color='#000088'>+ free( nmcpy );
</font> return -RTEMS_INVALID_NAME;
}
/* file must not exist */
if (!stat (nmcpy, &sbuf)) {
safe_printf ( DRVNM "Bad name: file exists already\n");
<font color='#000088'>+ free( nmcpy );
</font> return -RTEMS_INVALID_NAME;
}
<font color='#997700'>@@ -412,6 +414,7 @@
</font> if (i) {
safe_printf ( DRVNM "Get %s status failed: %s\n",
nmcpy, strerror(errno));
<font color='#000088'>+ free( nmcpy );
</font> return -RTEMS_INVALID_NAME;
}
/* should be a directory since name terminates in '/' */
<font color='#997700'>@@ -419,11 +422,13 @@
</font>
if (!libmutex) {
safe_printf ( DRVNM "Library not initialized\n");
<font color='#000088'>+ free( nmcpy );
</font> return -RTEMS_NOT_DEFINED;
}
if (bus == NULL || bus->size < sizeof (*bus)) {
safe_printf ( DRVNM "No bus-ops or size too small -- misconfiguration?\n");
<font color='#000088'>+ free( nmcpy );
</font> return -RTEMS_NOT_CONFIGURED;
}
<font color='#006600'>diff -u rtems/cpukit/libi2c/libi2c.c:1.16 rtems/cpukit/libi2c/libi2c.c:1.16.2.1
--- rtems/cpukit/libi2c/libi2c.c:1.16 Sun Nov 29 06:09:18 2009
+++ rtems/cpukit/libi2c/libi2c.c Mon Jun 21 11:27:12 2010
</font><font color='#997700'>@@ -395,11 +395,13 @@
</font> /* check */
if ('/' != *nmcpy) {
safe_printf ( DRVNM "Bad name: must be an absolute path starting with '/'\n");
<font color='#000088'>+ free( nmcpy );
</font> return -RTEMS_INVALID_NAME;
}
/* file must not exist */
if (!stat (nmcpy, &sbuf)) {
safe_printf ( DRVNM "Bad name: file exists already\n");
<font color='#000088'>+ free( nmcpy );
</font> return -RTEMS_INVALID_NAME;
}
<font color='#997700'>@@ -412,6 +414,7 @@
</font> if (i) {
safe_printf ( DRVNM "Get %s status failed: %s\n",
nmcpy, strerror(errno));
<font color='#000088'>+ free( nmcpy );
</font> return -RTEMS_INVALID_NAME;
}
/* should be a directory since name terminates in '/' */
<font color='#997700'>@@ -419,11 +422,13 @@
</font>
if (libmutex == RTEMS_ID_NONE) {
safe_printf ( DRVNM "Library not initialized\n");
<font color='#000088'>+ free( nmcpy );
</font> return -RTEMS_NOT_DEFINED;
}
if (bus == NULL || bus->size < sizeof (*bus)) {
safe_printf ( DRVNM "No bus-ops or size too small -- misconfiguration?\n");
<font color='#000088'>+ free( nmcpy );
</font> return -RTEMS_NOT_CONFIGURED;
}
</pre>
<p> </p>
<a name='cs3'></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>
PR 1554/cpukit
Coverity Id 17
* libi2c/libi2c.c, score/src/objectextendinformation.c: Fix memory leak
on error.
</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.2444&r2=text&tr2=1.2445&diff_format=h">M</a></td><td width='1%'>1.2445</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libi2c/libi2c.c.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%'>cpukit/libi2c/libi2c.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/objectextendinformation.c.diff?r1=text&tr1=1.21&r2=text&tr2=1.22&diff_format=h">M</a></td><td width='1%'>1.22</td><td width='100%'>cpukit/score/src/objectextendinformation.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2444 rtems/cpukit/ChangeLog:1.2445
--- rtems/cpukit/ChangeLog:1.2444 Mon Jun 21 11:25:08 2010
+++ rtems/cpukit/ChangeLog Mon Jun 21 11:27:36 2010
</font><font color='#997700'>@@ -1,5 +1,12 @@
</font> 2010-06-21 Joel Sherrill <joel.sherrilL@OARcorp.com>
<font color='#000088'>+ PR 1554/cpukit
+ Coverity Id 17
+ * libi2c/libi2c.c, score/src/objectextendinformation.c: Fix memory leak
+ on error.
+
+2010-06-21 Joel Sherrill <joel.sherrilL@OARcorp.com>
+
</font> PR 1559/misc
Coverity Id 16
* libmisc/monitor/mon-editor.c: Fix buffer overflow.
<font color='#006600'>diff -u rtems/cpukit/libi2c/libi2c.c:1.16 rtems/cpukit/libi2c/libi2c.c:1.17
--- rtems/cpukit/libi2c/libi2c.c:1.16 Sun Nov 29 06:09:18 2009
+++ rtems/cpukit/libi2c/libi2c.c Mon Jun 21 11:27:37 2010
</font><font color='#997700'>@@ -389,17 +389,23 @@
</font> char tmp, *chpt;
struct stat sbuf;
<font color='#880000'>- strcpy (nmcpy, name ? name : "/dev/i2c");
</font><font color='#000088'>+ if (nmcpy == NULL) {
+ safe_printf ( DRVNM "No memory\n");
+ return -RTEMS_NO_MEMORY;
+ }
</font>
<font color='#000088'>+ strcpy (nmcpy, name ? name : "/dev/i2c");
</font>
/* check */
if ('/' != *nmcpy) {
safe_printf ( DRVNM "Bad name: must be an absolute path starting with '/'\n");
<font color='#000088'>+ free( nmcpy );
</font> return -RTEMS_INVALID_NAME;
}
/* file must not exist */
if (!stat (nmcpy, &sbuf)) {
safe_printf ( DRVNM "Bad name: file exists already\n");
<font color='#000088'>+ free( nmcpy );
</font> return -RTEMS_INVALID_NAME;
}
<font color='#997700'>@@ -412,6 +418,7 @@
</font> if (i) {
safe_printf ( DRVNM "Get %s status failed: %s\n",
nmcpy, strerror(errno));
<font color='#000088'>+ free( nmcpy );
</font> return -RTEMS_INVALID_NAME;
}
/* should be a directory since name terminates in '/' */
<font color='#997700'>@@ -419,11 +426,13 @@
</font>
if (libmutex == RTEMS_ID_NONE) {
safe_printf ( DRVNM "Library not initialized\n");
<font color='#000088'>+ free( nmcpy );
</font> return -RTEMS_NOT_DEFINED;
}
if (bus == NULL || bus->size < sizeof (*bus)) {
safe_printf ( DRVNM "No bus-ops or size too small -- misconfiguration?\n");
<font color='#000088'>+ free( nmcpy );
</font> return -RTEMS_NOT_CONFIGURED;
}
<font color='#006600'>diff -u rtems/cpukit/score/src/objectextendinformation.c:1.21 rtems/cpukit/score/src/objectextendinformation.c:1.22
--- rtems/cpukit/score/src/objectextendinformation.c:1.21 Wed Jan 20 11:08:19 2010
+++ rtems/cpukit/score/src/objectextendinformation.c Mon Jun 21 11:27:37 2010
</font><font color='#997700'>@@ -56,11 +56,13 @@
</font> uint32_t maximum;
size_t block_size;
void *new_object_block;
<font color='#000088'>+ bool do_extend;
</font>
/*
<font color='#880000'>- * Search for a free block of indexes. The block variable ends up set
- * to block_count + 1 if the table needs to be extended.
</font><font color='#000088'>+ * Search for a free block of indexes. If we do NOT need to allocate or
+ * extend the block table, then we will change do_extend.
</font> */
<font color='#000088'>+ do_extend = true;
</font> minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
<font color='#997700'>@@ -72,9 +74,10 @@
</font> block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
<font color='#880000'>- if ( information->object_blocks[ block ] == NULL )
</font><font color='#000088'>+ if ( information->object_blocks[ block ] == NULL ) {
+ do_extend = false;
</font> break;
<font color='#880000'>- else
</font><font color='#000088'>+ } else
</font> index_base += information->allocation_size;
}
}
<font color='#997700'>@@ -104,9 +107,9 @@
</font> }
/*
<font color='#880000'>- * If the index_base is the maximum we need to grow the tables.
</font><font color='#000088'>+ * Do we need to grow the tables?
</font> */
<font color='#880000'>- if (index_base >= information->maximum ) {
</font><font color='#000088'>+ if ( do_extend ) {
</font> ISR_Level level;
void **object_blocks;
uint32_t *inactive_per_block;
</pre>
<p> </p>
<a name='cs4'></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>
<font color='#225522'><em>(on branch rtems-4-10-branch)</em></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2010-06-21 Peter Dufault <dufault@hda.com>
PR 1570/cpukit
* posix/src/semtimedwait.c: This routine is supposed to return -1/errno
NOT the status directly.
</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.2445&r2=text&tr2=1.2446&diff_format=h">M</a></td><td width='1%'>1.2446</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.696.2.106&r2=text&tr2=1.696.2.107&diff_format=h">M</a></td><td width='1%'>1.696.2.107</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.1080.2.58&r2=text&tr2=1.1080.2.59&diff_format=h">M</a></td><td width='1%'>1.1080.2.59</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.1539.2.64&r2=text&tr2=1.1539.2.65&diff_format=h">M</a></td><td width='1%'>1.1539.2.65</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2346.2.43&r2=text&tr2=1.2346.2.44&diff_format=h">M</a></td><td width='1%'>1.2346.2.44</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/posix/src/semtimedwait.c.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%'>cpukit/posix/src/semtimedwait.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/posix/src/semtimedwait.c.diff?r1=text&tr1=1.4.2.3&r2=text&tr2=1.4.2.4&diff_format=h">M</a></td><td width='1%'>1.4.2.4</td><td width='100%'>cpukit/posix/src/semtimedwait.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/posix/src/semtimedwait.c.diff?r1=text&tr1=1.9.2.1&r2=text&tr2=1.9.2.2&diff_format=h">M</a></td><td width='1%'>1.9.2.2</td><td width='100%'>cpukit/posix/src/semtimedwait.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/posix/src/semtimedwait.c.diff?r1=text&tr1=1.11&r2=text&tr2=1.11.2.1&diff_format=h">M</a></td><td width='1%'>1.11.2.1</td><td width='100%'>cpukit/posix/src/semtimedwait.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/posix/src/semtimedwait.c.diff?r1=text&tr1=1.13&r2=text&tr2=1.13.2.1&diff_format=h">M</a></td><td width='1%'>1.13.2.1</td><td width='100%'>cpukit/posix/src/semtimedwait.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2445 rtems/cpukit/ChangeLog:1.2446
--- rtems/cpukit/ChangeLog:1.2445 Mon Jun 21 11:27:36 2010
+++ rtems/cpukit/ChangeLog Mon Jun 21 11:38:26 2010
</font><font color='#997700'>@@ -1,3 +1,9 @@
</font><font color='#000088'>+2010-06-21 Peter Dufault <dufault@hda.com>
+
+ PR 1570/cpukit
+ * posix/src/semtimedwait.c: This routine is supposed to return -1/errno
+ NOT the status directly.
+
</font> 2010-06-21 Joel Sherrill <joel.sherrilL@OARcorp.com>
PR 1554/cpukit
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.696.2.106 rtems/cpukit/ChangeLog:1.696.2.107
--- rtems/cpukit/ChangeLog:1.696.2.106 Thu Dec 10 16:38:36 2009
+++ rtems/cpukit/ChangeLog Mon Jun 21 11:38:55 2010
</font><font color='#997700'>@@ -1,3 +1,9 @@
</font><font color='#000088'>+2010-06-21 Peter Dufault <dufault@hda.com>
+
+ PR 1570/cpukit
+ * posix/src/semtimedwait.c: This routine is supposed to return -1/errno
+ NOT the status directly.
+
</font> 2009-12-10 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1482
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.1080.2.58 rtems/cpukit/ChangeLog:1.1080.2.59
--- rtems/cpukit/ChangeLog:1.1080.2.58 Thu Dec 10 16:19:35 2009
+++ rtems/cpukit/ChangeLog Mon Jun 21 11:38:46 2010
</font><font color='#997700'>@@ -1,3 +1,9 @@
</font><font color='#000088'>+2010-06-21 Peter Dufault <dufault@hda.com>
+
+ PR 1570/cpukit
+ * posix/src/semtimedwait.c: This routine is supposed to return -1/errno
+ NOT the status directly.
+
</font> 2009-12-10 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1482
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.1539.2.64 rtems/cpukit/ChangeLog:1.1539.2.65
--- rtems/cpukit/ChangeLog:1.1539.2.64 Mon Jun 21 11:27:22 2010
+++ rtems/cpukit/ChangeLog Mon Jun 21 11:38:39 2010
</font><font color='#997700'>@@ -1,3 +1,9 @@
</font><font color='#000088'>+2010-06-21 Peter Dufault <dufault@hda.com>
+
+ PR 1570/cpukit
+ * posix/src/semtimedwait.c: This routine is supposed to return -1/errno
+ NOT the status directly.
+
</font> 2010-06-21 Joel Sherrill <joel.sherrilL@OARcorp.com>
PR 1554/cpukit
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2346.2.43 rtems/cpukit/ChangeLog:1.2346.2.44
--- rtems/cpukit/ChangeLog:1.2346.2.43 Mon Jun 21 11:27:11 2010
+++ rtems/cpukit/ChangeLog Mon Jun 21 11:38:32 2010
</font><font color='#997700'>@@ -1,3 +1,9 @@
</font><font color='#000088'>+2010-06-21 Peter Dufault <dufault@hda.com>
+
+ PR 1570/cpukit
+ * posix/src/semtimedwait.c: This routine is supposed to return -1/errno
+ NOT the status directly.
+
</font> 2010-06-21 Joel Sherrill <joel.sherrilL@OARcorp.com>
PR 1554/cpukit
<font color='#006600'>diff -u rtems/cpukit/posix/src/semtimedwait.c:1.13 rtems/cpukit/posix/src/semtimedwait.c:1.14
--- rtems/cpukit/posix/src/semtimedwait.c:1.13 Mon Nov 30 09:44:21 2009
+++ rtems/cpukit/posix/src/semtimedwait.c Mon Jun 21 11:38:26 2010
</font><font color='#997700'>@@ -72,10 +72,10 @@
</font> if ( !do_wait && (lock_status == EBUSY) ) {
switch (lock_status) {
case POSIX_ABSOLUTE_TIMEOUT_INVALID:
<font color='#880000'>- return EINVAL;
</font><font color='#000088'>+ rtems_set_errno_and_return_minus_one( EINVAL );
</font> case POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST:
case POSIX_ABSOLUTE_TIMEOUT_IS_NOW:
<font color='#880000'>- return ETIMEDOUT;
</font><font color='#000088'>+ rtems_set_errno_and_return_minus_one( ETIMEDOUT );
</font> case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
<font color='#006600'>diff -u rtems/cpukit/posix/src/semtimedwait.c:1.4.2.3 rtems/cpukit/posix/src/semtimedwait.c:1.4.2.4
--- rtems/cpukit/posix/src/semtimedwait.c:1.4.2.3 Thu Jul 24 15:43:24 2008
+++ rtems/cpukit/posix/src/semtimedwait.c Mon Jun 21 11:38:56 2010
</font><font color='#997700'>@@ -69,10 +69,10 @@
</font> if ( !do_wait && (lock_status == EBUSY) ) {
switch (lock_status) {
case POSIX_ABSOLUTE_TIMEOUT_INVALID:
<font color='#880000'>- return EINVAL;
</font><font color='#000088'>+ rtems_set_errno_and_return_minus_one( EINVAL );
</font> case POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST:
case POSIX_ABSOLUTE_TIMEOUT_IS_NOW:
<font color='#880000'>- return ETIMEDOUT;
</font><font color='#000088'>+ rtems_set_errno_and_return_minus_one( ETIMEDOUT );
</font> case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
<font color='#006600'>diff -u rtems/cpukit/posix/src/semtimedwait.c:1.9.2.1 rtems/cpukit/posix/src/semtimedwait.c:1.9.2.2
--- rtems/cpukit/posix/src/semtimedwait.c:1.9.2.1 Tue Jul 22 12:17:12 2008
+++ rtems/cpukit/posix/src/semtimedwait.c Mon Jun 21 11:38:47 2010
</font><font color='#997700'>@@ -76,10 +76,10 @@
</font> if ( !do_wait && (lock_status == EBUSY) ) {
switch (lock_status) {
case POSIX_ABSOLUTE_TIMEOUT_INVALID:
<font color='#880000'>- return EINVAL;
</font><font color='#000088'>+ rtems_set_errno_and_return_minus_one( EINVAL );
</font> case POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST:
case POSIX_ABSOLUTE_TIMEOUT_IS_NOW:
<font color='#880000'>- return ETIMEDOUT;
</font><font color='#000088'>+ rtems_set_errno_and_return_minus_one( ETIMEDOUT );
</font> case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
<font color='#006600'>diff -u rtems/cpukit/posix/src/semtimedwait.c:1.11 rtems/cpukit/posix/src/semtimedwait.c:1.11.2.1
--- rtems/cpukit/posix/src/semtimedwait.c:1.11 Thu Sep 4 10:23:12 2008
+++ rtems/cpukit/posix/src/semtimedwait.c Mon Jun 21 11:38:40 2010
</font><font color='#997700'>@@ -76,10 +76,10 @@
</font> if ( !do_wait && (lock_status == EBUSY) ) {
switch (lock_status) {
case POSIX_ABSOLUTE_TIMEOUT_INVALID:
<font color='#880000'>- return EINVAL;
</font><font color='#000088'>+ rtems_set_errno_and_return_minus_one( EINVAL );
</font> case POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST:
case POSIX_ABSOLUTE_TIMEOUT_IS_NOW:
<font color='#880000'>- return ETIMEDOUT;
</font><font color='#000088'>+ rtems_set_errno_and_return_minus_one( ETIMEDOUT );
</font> case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
<font color='#006600'>diff -u rtems/cpukit/posix/src/semtimedwait.c:1.13 rtems/cpukit/posix/src/semtimedwait.c:1.13.2.1
--- rtems/cpukit/posix/src/semtimedwait.c:1.13 Mon Nov 30 09:44:21 2009
+++ rtems/cpukit/posix/src/semtimedwait.c Mon Jun 21 11:38:34 2010
</font><font color='#997700'>@@ -72,10 +72,10 @@
</font> if ( !do_wait && (lock_status == EBUSY) ) {
switch (lock_status) {
case POSIX_ABSOLUTE_TIMEOUT_INVALID:
<font color='#880000'>- return EINVAL;
</font><font color='#000088'>+ rtems_set_errno_and_return_minus_one( EINVAL );
</font> case POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST:
case POSIX_ABSOLUTE_TIMEOUT_IS_NOW:
<font color='#880000'>- return ETIMEDOUT;
</font><font color='#000088'>+ rtems_set_errno_and_return_minus_one( ETIMEDOUT );
</font> case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
</pre>
<p> </p>
<a name='cs5'></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: New test for barrier create, ident, and
delete.
* tm30/.cvsignore, tm30/Makefile.am, tm30/init.c, tm30/tm30.doc: New
files.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/tmtests/ChangeLog.diff?r1=text&tr1=1.87&r2=text&tr2=1.88&diff_format=h">M</a></td><td width='1%'>1.88</td><td width='100%'>testsuites/tmtests/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/tmtests/Makefile.am.diff?r1=text&tr1=1.14&r2=text&tr2=1.15&diff_format=h">M</a></td><td width='1%'>1.15</td><td width='100%'>testsuites/tmtests/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/tmtests/configure.ac.diff?r1=text&tr1=1.21&r2=text&tr2=1.22&diff_format=h">M</a></td><td width='1%'>1.22</td><td width='100%'>testsuites/tmtests/configure.ac</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/tmtests/tm30/.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/tmtests/tm30/.cvsignore</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/tmtests/tm30/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/tmtests/tm30/Makefile.am</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/tmtests/tm30/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/tmtests/tm30/init.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/tmtests/tm30/tm30.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/tmtests/tm30/tm30.doc</font></td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/tmtests/ChangeLog:1.87 rtems/testsuites/tmtests/ChangeLog:1.88
--- rtems/testsuites/tmtests/ChangeLog:1.87 Tue Dec 8 11:53:00 2009
+++ rtems/testsuites/tmtests/ChangeLog Mon Jun 21 11:53:50 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: New test for barrier create, ident, and
+ delete.
+ * tm30/.cvsignore, tm30/Makefile.am, tm30/init.c, tm30/tm30.doc: New
+ files.
+
</font> 2009-12-08 Joel Sherrill <joel.sherrill@oarcorp.com>
* tm20/task1.c: Use rtems_test_assert() consistently instead of system
<font color='#006600'>diff -u rtems/testsuites/tmtests/Makefile.am:1.14 rtems/testsuites/tmtests/Makefile.am:1.15
--- rtems/testsuites/tmtests/Makefile.am:1.14 Tue Nov 8 08:17:00 2005
+++ rtems/testsuites/tmtests/Makefile.am Mon Jun 21 11:53:50 2010
</font><font color='#997700'>@@ -6,7 +6,7 @@
</font>
SUBDIRS = tmck tmoverhd tm01 tm02 tm03 tm04 tm05 tm06 tm07 tm08 tm09 tm10 \
tm11 tm12 tm13 tm14 tm15 tm16 tm17 tm18 tm19 tm20 tm21 tm22 tm23 tm24 \
<font color='#880000'>- tm25 tm26 tm27 tm28 tm29
</font><font color='#000088'>+ tm25 tm26 tm27 tm28 tm29 tm30
</font>
include $(top_srcdir)/../automake/subdirs.am
include $(top_srcdir)/../automake/local.am
<font color='#006600'>diff -u rtems/testsuites/tmtests/configure.ac:1.21 rtems/testsuites/tmtests/configure.ac:1.22
--- rtems/testsuites/tmtests/configure.ac:1.21 Mon Oct 19 23:14:56 2009
+++ rtems/testsuites/tmtests/configure.ac Mon Jun 21 11:53:50 2010
</font><font color='#997700'>@@ -61,5 +61,6 @@
</font> tm27/Makefile
tm28/Makefile
tm29/Makefile
<font color='#000088'>+tm30/Makefile
</font> ])
AC_OUTPUT
<font color='#006600'>diff -u /dev/null rtems/testsuites/tmtests/tm30/.cvsignore:1.1
--- /dev/null Mon Jun 21 12:11:59 2010
+++ rtems/testsuites/tmtests/tm30/.cvsignore Mon Jun 21 11:53:50 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/tmtests/tm30/Makefile.am:1.1
--- /dev/null Mon Jun 21 12:11:59 2010
+++ rtems/testsuites/tmtests/tm30/Makefile.am Mon Jun 21 11:53:50 2010
</font><font color='#997700'>@@ -0,0 +1,29 @@
</font><font color='#000088'>+##
+## $Id$
+##
+
+MANAGERS = io rate_monotonic semaphore
+
+rtems_tests_PROGRAMS = tm30
+tm30_SOURCES = init.c ../include/timesys.h \
+ ../../support/src/tmtests_empty_function.c \
+ ../../support/src/tmtests_support.c
+
+dist_rtems_tests_DATA = tm30.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)/include -DOPERATION_COUNT=$(OPERATION_COUNT)
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(tm30_OBJECTS) $(tm30_LDADD)
+LINK_LIBS = $(tm30_LDLIBS)
+
+tm30$(EXEEXT): $(tm30_OBJECTS) $(tm30_DEPENDENCIES)
+ @rm -f tm30$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/tmtests/tm30/init.c:1.1
--- /dev/null Mon Jun 21 12:11:59 2010
+++ rtems/testsuites/tmtests/tm30/init.c Mon Jun 21 11:53:50 2010
</font><font color='#997700'>@@ -0,0 +1,106 @@
</font><font color='#000088'>+/*
+ * 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 <bsp.h>
+#include <coverhd.h>
+#include <tmacros.h>
+#include <timesys.h>
+#include "test_support.h"
+
+rtems_id barrier[ OPERATION_COUNT ];
+
+void benchmark_barrier_create(
+ int iteration,
+ void *argument
+)
+{
+ rtems_status_code status;
+
+ status = rtems_barrier_create(
+ iteration + 1,
+ RTEMS_LOCAL | RTEMS_FIFO,
+ 2,
+ &barrier[iteration]
+ );
+ directive_failed(status, "rtems_barrier_create");
+}
+
+void benchmark_barrier_ident(
+ int iteration,
+ void *argument
+)
+{
+ rtems_status_code status;
+ rtems_id id;
+
+ status = rtems_barrier_ident( iteration+1, &id );
+ directive_failed(status, "rtems_barrier_ident");
+}
+
+void benchmark_barrier_delete(
+ int iteration,
+ void *argument
+)
+{
+ rtems_status_code status;
+
+ status = rtems_barrier_delete( barrier[iteration] );
+ directive_failed(status, "rtems_barrier_delete");
+}
+
+rtems_task Init(
+ rtems_task_argument argument
+)
+{
+ puts( "\n\n*** TIME TEST 30 ***" );
+
+ rtems_time_test_measure_operation(
+ "rtems_barrier_create",
+ benchmark_barrier_create,
+ NULL,
+ OPERATION_COUNT,
+ 0
+ );
+<span style="background-color: #FF0000"> </span>
+ rtems_time_test_measure_operation(
+ "rtems_barrier_ident",
+ benchmark_barrier_ident,
+ NULL,
+ OPERATION_COUNT,
+ 0
+ );
+<span style="background-color: #FF0000"> </span>
+ rtems_time_test_measure_operation(
+ "rtems_barrier_delete",
+ benchmark_barrier_delete,
+ NULL,
+ OPERATION_COUNT,
+ 0
+ );
+<span style="background-color: #FF0000"> </span>
+ puts( "*** END OF TIME TEST 30 ***" );
+
+ rtems_test_exit(0);
+}
+
+/* configuration information */
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+#define CONFIGURE_MAXIMUM_BARRIERS OPERATION_COUNT
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
+/* end of file */
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/tmtests/tm30/tm30.doc:1.1
--- /dev/null Mon Jun 21 12:11:59 2010
+++ rtems/testsuites/tmtests/tm30/tm30.doc Mon Jun 21 11:53:50 2010
</font><font color='#997700'>@@ -0,0 +1,15 @@
</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 test benchmarks the following operations:
+
++ rtems_barrier_create
++ rtems_barrier_delete
</font></pre>
<p> </p>
<a name='cs6'></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>
* support/include/test_support.h, support/src/tmtests_empty_function.c:
Add helper so it is easier to write a basic repeated operation
tmtest.
* support/src/tmtests_support.c: New file.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/ChangeLog.diff?r1=text&tr1=1.166&r2=text&tr2=1.167&diff_format=h">M</a></td><td width='1%'>1.167</td><td width='100%'>testsuites/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/support/include/test_support.h.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>testsuites/support/include/test_support.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/support/src/tmtests_empty_function.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/support/src/tmtests_empty_function.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/support/src/tmtests_support.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/support/src/tmtests_support.c</font></td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/ChangeLog:1.166 rtems/testsuites/ChangeLog:1.167
--- rtems/testsuites/ChangeLog:1.166 Thu Jun 17 11:02:31 2010
+++ rtems/testsuites/ChangeLog Mon Jun 21 11:54:17 2010
</font><font color='#997700'>@@ -1,3 +1,10 @@
</font><font color='#000088'>+2010-06-21 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * support/include/test_support.h, support/src/tmtests_empty_function.c:
+ Add helper so it is easier to write a basic repeated operation
+ tmtest.
+ * support/src/tmtests_support.c: New file.
+
</font> 2010-06-17 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Remove itron.
<font color='#006600'>diff -u rtems/testsuites/support/include/test_support.h:1.3 rtems/testsuites/support/include/test_support.h:1.4
--- rtems/testsuites/support/include/test_support.h:1.3 Tue Dec 8 15:39:21 2009
+++ rtems/testsuites/support/include/test_support.h Mon Jun 21 11:54:17 2010
</font><font color='#997700'>@@ -46,6 +46,31 @@
</font> */
void rtems_test_spin_until_next_tick( void );
<font color='#000088'>+/*********************************************************************/
+/*********************************************************************/
+/************** TMTEST SUPPORT **************/
+/*********************************************************************/
+/*********************************************************************/
+
+/*
+ * Type of method used for timing operations
+ */
+typedef void (*rtems_time_test_method_t)(
+ int iteration,
+ void *argument
+);
+
+/*
+ * Obtain baseline timing information for benchmark tests.
+ */
+void rtems_time_test_measure_operation(
+ const char *description,
+ rtems_time_test_method_t operation,
+ void *argument,
+ int iterations,
+ int overhead
+);
+
</font> #ifdef __cplusplus
};
#endif
<font color='#006600'>diff -u rtems/testsuites/support/src/tmtests_empty_function.c:1.2 rtems/testsuites/support/src/tmtests_empty_function.c:1.3
--- rtems/testsuites/support/src/tmtests_empty_function.c:1.2 Sun May 10 09:43:44 2009
+++ rtems/testsuites/support/src/tmtests_empty_function.c Mon Jun 21 11:54:17 2010
</font><font color='#997700'>@@ -20,3 +20,10 @@
</font> {
return RTEMS_SUCCESSFUL;
}
<font color='#000088'>+
+void benchmark_timer_empty_operation(
+ int iteration,
+ void *argument
+)
+{
+}
</font>
<font color='#006600'>diff -u /dev/null rtems/testsuites/support/src/tmtests_support.c:1.1
--- /dev/null Mon Jun 21 12:12:00 2010
+++ rtems/testsuites/support/src/tmtests_support.c Mon Jun 21 11:54:17 2010
</font><font color='#997700'>@@ -0,0 +1,53 @@
</font><font color='#000088'>+/*
+ * 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 <bsp.h>
+#include <rtems/timerdrv.h>
+#include "test_support.h"
+#include "timesys.h"
+
+extern void benchmark_timer_empty_operation(
+ int iteration,
+ void *argument
+);
+
+void rtems_time_test_measure_operation(
+ const char *description,
+ rtems_time_test_method_t operation,
+ void *argument,
+ int iterations,
+ int overhead
+)
+{
+ int i;
+ int loop_overhead;
+ int end_time;
+
+ benchmark_timer_initialize();
+ for (i=0 ; i<iterations ; i++ ) {
+ benchmark_timer_empty_operation( i, argument );
+ }
+ loop_overhead = benchmark_timer_read();
+
+ benchmark_timer_initialize();
+ for (i=0 ; i<iterations ; i++ ) {
+ (*operation)( i, argument );
+ }
+ end_time = benchmark_timer_read();
+
+ put_time(
+ description,
+ end_time,
+ iterations,
+ loop_overhead,
+ overhead
+ );
+}
</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>