<!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-10-17)</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>jennifer</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-10-17 Daniel Hellstrom <daniel@gaisler.com>
PR 1935/cpukit
* score/include/rtems/score/smplock.h, score/src/smplock.c: SMP nested
count variable was being overritten when nested lock was taken more
than once.
</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.2951&r2=text&tr2=1.2952&diff_format=h">M</a></td><td width='1%'>1.2952</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/include/rtems/score/smplock.h.diff?r1=text&tr1=1.5&r2=text&tr2=1.6&diff_format=h">M</a></td><td width='1%'>1.6</td><td width='100%'>cpukit/score/include/rtems/score/smplock.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/smplock.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/score/src/smplock.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2951 rtems/cpukit/ChangeLog:1.2952
--- rtems/cpukit/ChangeLog:1.2951 Mon Oct 17 10:54:40 2011
+++ rtems/cpukit/ChangeLog Mon Oct 17 13:51:44 2011
</font><font color='#997700'>@@ -1,3 +1,10 @@
</font><font color='#000088'>+2011-10-17 Daniel Hellstrom <daniel@gaisler.com>
+
+ PR 1935/cpukit
+ * score/include/rtems/score/smplock.h, score/src/smplock.c: SMP nested
+ count variable was being overritten when nested lock was taken more
+ than once.
+
</font> 2011-10-17 Sebastian Huber <sebastian.huber@embedded-brains.de>
PR 1938/cpukit
<font color='#006600'>diff -u rtems/cpukit/score/include/rtems/score/smplock.h:1.5 rtems/cpukit/score/include/rtems/score/smplock.h:1.6
--- rtems/cpukit/score/include/rtems/score/smplock.h:1.5 Mon Aug 1 12:30:20 2011
+++ rtems/cpukit/score/include/rtems/score/smplock.h Mon Oct 17 13:51:44 2011
</font><font color='#997700'>@@ -50,6 +50,7 @@
</font> * times.
*/
typedef struct {
<font color='#000088'>+ SMP_lock_spinlock_simple_Control lock;
</font> uint32_t count;
int cpu_id;
} SMP_lock_spinlock_nested_Control;
<font color='#006600'>diff -u rtems/cpukit/score/src/smplock.c:1.4 rtems/cpukit/score/src/smplock.c:1.5
--- rtems/cpukit/score/src/smplock.c:1.4 Mon Aug 22 13:26:08 2011
+++ rtems/cpukit/score/src/smplock.c Mon Oct 17 13:51:44 2011
</font><font color='#997700'>@@ -114,6 +114,7 @@
</font> SMP_lock_spinlock_nested_Control *lock
)
{
<font color='#000088'>+ lock->lock = 0;
</font> lock->count = 0;
lock->cpu_id = -1;
}
<font color='#997700'>@@ -143,8 +144,9 @@
</font> if (lock->count == 1) {
lock->cpu_id = -1;
debug_logit( 'U', lock );
<font color='#880000'>- RTEMS_COMPILER_MEMORY_BARRIER();
</font> lock->count = 0;
<font color='#000088'>+ RTEMS_COMPILER_MEMORY_BARRIER();
+ lock->lock = 0;
</font> } else {
debug_logit( 'u', lock );
lock->count--;
<font color='#997700'>@@ -174,7 +176,7 @@
</font> */
while (1) {
RTEMS_COMPILER_MEMORY_BARRIER();
<font color='#880000'>- SMP_CPU_SWAP( &lock->count, value, previous );
</font><font color='#000088'>+ SMP_CPU_SWAP( &lock->lock, value, previous );
</font> RTEMS_COMPILER_MEMORY_BARRIER();
if ( previous == 0 ) {
/* was not locked */
<font color='#997700'>@@ -190,6 +192,7 @@
</font> }
lock->cpu_id = cpu_id;
<font color='#000088'>+ lock->count = 1;
</font> debug_logit( 'L', lock );
return level;
</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>