<!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-07-28)</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-07-28 Vinu Rajashekhar <vinutheraj@gmail.com>
* posix/src/condinit.c, posix/src/condwaitsupp.c,
posix/src/psignalunblockthread.c: Clean up some signal interruption
code.
</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.2532&r2=text&tr2=1.2533&diff_format=h">M</a></td><td width='1%'>1.2533</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/condinit.c.diff?r1=text&tr1=1.8&r2=text&tr2=1.9&diff_format=h">M</a></td><td width='1%'>1.9</td><td width='100%'>cpukit/posix/src/condinit.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/posix/src/condwaitsupp.c.diff?r1=text&tr1=1.8&r2=text&tr2=1.9&diff_format=h">M</a></td><td width='1%'>1.9</td><td width='100%'>cpukit/posix/src/condwaitsupp.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/posix/src/psignalunblockthread.c.diff?r1=text&tr1=1.11&r2=text&tr2=1.12&diff_format=h">M</a></td><td width='1%'>1.12</td><td width='100%'>cpukit/posix/src/psignalunblockthread.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2532 rtems/cpukit/ChangeLog:1.2533
--- rtems/cpukit/ChangeLog:1.2532 Tue Jul 27 16:22:52 2010
+++ rtems/cpukit/ChangeLog Wed Jul 28 15:39:37 2010
</font><font color='#997700'>@@ -1,3 +1,9 @@
</font><font color='#000088'>+2010-07-28 Vinu Rajashekhar <vinutheraj@gmail.com>
+
+ * posix/src/condinit.c, posix/src/condwaitsupp.c,
+ posix/src/psignalunblockthread.c: Clean up some signal interruption
+ code.
+
</font> 2010-07-27 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/src/keycreate.c: Fix typo.
<font color='#006600'>diff -u rtems/cpukit/posix/src/condinit.c:1.8 rtems/cpukit/posix/src/condinit.c:1.9
--- rtems/cpukit/posix/src/condinit.c:1.8 Wed Jan 23 16:57:43 2008
+++ rtems/cpukit/posix/src/condinit.c Wed Jul 28 15:39:40 2010
</font><font color='#997700'>@@ -44,7 +44,6 @@
</font> /*
* Be careful about attributes when global!!!
*/
<font color='#880000'>-
</font> if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
return EINVAL;
<font color='#997700'>@@ -64,11 +63,10 @@
</font>
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
<font color='#880000'>-/* XXX some more initialization might need to go here */
</font> _Thread_queue_Initialize(
&the_cond->Wait_queue,
THREAD_QUEUE_DISCIPLINE_FIFO,
<font color='#880000'>- STATES_WAITING_FOR_CONDITION_VARIABLE,
</font><font color='#000088'>+ STATES_WAITING_FOR_CONDITION_VARIABLE | STATES_INTERRUPTIBLE_BY_SIGNAL,
</font> ETIMEDOUT
);
<font color='#006600'>diff -u rtems/cpukit/posix/src/condwaitsupp.c:1.8 rtems/cpukit/posix/src/condwaitsupp.c:1.9
--- rtems/cpukit/posix/src/condwaitsupp.c:1.8 Thu Sep 4 10:23:11 2008
+++ rtems/cpukit/posix/src/condwaitsupp.c Wed Jul 28 15:39:44 2010
</font><font color='#997700'>@@ -85,9 +85,16 @@
</font> * _Thread_queue_Enqueue.
*/
<font color='#000088'>+ /*
+ * If the thread is interrupted, while in the thread queue, by
+ * a POSIX signal, then pthread_cond_wait returns spuriously,
+ * according to the POSIX standard. It means that pthread_cond_wait
+ * returns a success status, except for the fact that it was not
+ * woken up a pthread_cond_signal or a pthread_cond_broadcast.
+ */
</font> status = _Thread_Executing->Wait.return_code;
<font color='#880000'>- if ( status && status != ETIMEDOUT )
- return status;
</font><font color='#000088'>+ if ( status == EINTR )
+ status = 0;
</font>
} else {
_Thread_Enable_dispatch();
<font color='#006600'>diff -u rtems/cpukit/posix/src/psignalunblockthread.c:1.11 rtems/cpukit/posix/src/psignalunblockthread.c:1.12
--- rtems/cpukit/posix/src/psignalunblockthread.c:1.11 Mon Jun 28 19:34:11 2010
+++ rtems/cpukit/posix/src/psignalunblockthread.c Wed Jul 28 15:39:48 2010
</font><font color='#997700'>@@ -101,21 +101,17 @@
</font> if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
the_thread->Wait.return_code = EINTR;
/*
<font color='#880000'>- * At this time, there is no RTEMS API object which lets a task
- * block on a thread queue and be interruptible by a POSIX signal.
- * If an object class with that requirement is ever added, enable
- * this code.
</font><font color='#000088'>+ * In pthread_cond_wait, a thread will be blocking on a thread
+ * queue, but is also interruptible by a POSIX signal.
</font> */
<font color='#880000'>- #if 0
</font> if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
_Thread_queue_Extract_with_proxy( the_thread );
<font color='#880000'>- else
- #endif
- if ( _States_Is_delaying(the_thread->current_state) ){
</font><font color='#000088'>+ else if ( _States_Is_delaying(the_thread->current_state) ){
</font> if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
_Thread_Unblock( the_thread );
}
<font color='#000088'>+
</font> } else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
</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>