<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="country-region"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--p
{white-space: pre-wrap;}
li
{white-space: pre-wrap;}
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Console;
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman";}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
<meta name=qrichtext content=1>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
rtems-users-bounces@rtems.org [mailto:rtems-users-bounces@rtems.org] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Leon Pollak<br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, April 22, 2009
5:22 PM<br>
<b><span style='font-weight:bold'>To:</span></b> Thomas Dörfler<br>
<b><span style='font-weight:bold'>Cc:</span></b> rtems-users@rtems.com.<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re:
rtems_iterate_over_all_threads</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Console><span style='font-size:12.0pt;
font-family:Console'>On Wednesday April 22 2009, Thomas Dörfler wrote:<br>
> I really doubt that I have a bigger experience than you have, and please<br>
> don't take my critics against your proposal personally.<br>
I respect you enough not to do this...:-)<br>
<br>
<o:p></o:p></span></font></p>
<p style='margin:0in;margin-bottom:.0001pt'><font size=3 face=Console><span
style='font-size:12.0pt;font-family:Console'><o:p> </o:p></span></font></p>
<p style='margin:0in;margin-bottom:.0001pt;-qt-paragraph-type:empty;-qt-block-indent:0;
-qt-user-state:0'><font size=3 face=Console><span style='font-size:12.0pt;
font-family:Console'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Console><span style='font-size:12.0pt;
font-family:Console'>> I think RTEMS has several methods to control, when a
task should execute<br>
> and when it shouldn't. Most of them are synchronous to each task's<br>
> probgram flow (e.g. semaphores, waiting for events etc).<br>
><br>
> Suspending a task from outside almost always means that you don't know<br>
> the state this task is in when you suspend it. And if even multiple<br>
> "control" tasks would suspend/resume arbitrary other tasks, you
(no: I!)<br>
> would soon loose track when which task is suspended...<br>
><br>
> Consider your current problem: If I got you right, you want to make<br>
> sure, that no other task is executed even when your task is waiting<br>
> during I/O. Let's assume you use a serial termios channel for console<br>
> output. If you suspend another task, while it is somewhere deep in<br>
> termios, this task may even hold the output semaphore you are waiting on<br>
> to get control of the output channel.<br>
><br>
> In short: you can never be sure in which state you actually suspend a
task.<br>
><br>
> This is why I consider it bad practice to control other tasks via<br>
> suspend/resume.<br>
Well, I should intend to agree with you in general.<br>
But still, these commands 9suspend/resume) exist in the API and people (like
me) use them.<br>
<br>
<o:p></o:p></span></font></p>
<p style='margin:0in;margin-bottom:.0001pt'><font size=3 face=Console><span
style='font-size:12.0pt;font-family:Console'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Console><span style='font-size:12.0pt;
font-family:Console'>OK, we (users of s/r) need to be careful to avoid the case
you described, but still be able to do what we want.<br>
<br>
<o:p></o:p></span></font></p>
<p style='margin:0in;margin-bottom:.0001pt'><font size=3 face=Console><span
style='font-size:12.0pt;font-family:Console'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Console><span style='font-size:12.0pt;
font-family:Console'>Just now, it is a serious problem for me:<br>
I have an urgent job to be done, which can not be interrupted by other I/O and
processing tasks despite the state they reside in. I can not block interrupts
and task switching at all, as the urgent task must do some processing requiring
these facilities.<br>
<br>
<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>My 2 cents, if I may :) =><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> Why not make that task (that does the
urgent job) with a high priority? It seams the standard way of increasing
responsiveness while allowing interrupts and task switching…<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p style='margin:0in;margin-bottom:.0001pt'><font size=3 face=Console><span
style='font-size:12.0pt;font-family:Console'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Console><span style='font-size:12.0pt;
font-family:Console'>When the urgent job finishes, I should like to return to
the normal processing, which has been interrupted.<br>
<br>
<o:p></o:p></span></font></p>
<p style='margin:0in;margin-bottom:.0001pt'><font size=3 face=Console><span
style='font-size:12.0pt;font-family:Console'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Console><span style='font-size:12.0pt;
font-family:Console'>Just now, I can not, as previously suspended tasks will be
resumed by exiting from the urgent task.<br>
<br>
<o:p></o:p></span></font></p>
<p style='margin:0in;margin-bottom:.0001pt'><font size=3 face=Console><span
style='font-size:12.0pt;font-family:Console'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Console><span style='font-size:12.0pt;
font-family:Console'>May be you see some other way to do this?<br>
<br>
<o:p></o:p></span></font></p>
<p style='margin:0in;margin-bottom:.0001pt'><font size=3 face=Console><span
style='font-size:12.0pt;font-family:Console'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face=Console><span style='font-size:12.0pt;
font-family:Console'>Many thanks.<br>
<st1:country-region w:st="on"><st1:place w:st="on">Leon</st1:place></st1:country-region><o:p></o:p></span></font></p>
</div>
</div>
</body>
</html>