<div>Hi,</div>
<div>&nbsp;</div>
<div>If you are using iguana you can&nbsp;try creating your threads&nbsp;with the thread_create_simple function which receives priority as it&#39;s third argument, what&nbsp;are the priorities shown at KDB? </div>
<div>&nbsp;</div>
<div>Cheers,</div><span class="sg">
<div>&nbsp;</div>
<div>Jorge&nbsp;</div>
<div>&nbsp;</div></span><br><br>
<div><span class="gmail_quote">On 11/5/07, <b class="gmail_sendername">Choi, SuGil</b> &lt;<a href="mailto:sooguri@etri.re.kr">sooguri@etri.re.kr</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div style="FONT-SIZE: 10pt; FONT-FAMILY: System">
<div>A thread is created by calling function &quot;kernel_thread()&quot;.</div>
<div>&nbsp;</div>
<div>I think the thread created as above is different from L4 thread.</div>
<div>&nbsp;</div>
<div>Three client threads are created by calling &quot;kernel thread()&quot;.</div>
<div>&nbsp;</div>
<div><span class="q">&nbsp;----------&nbsp;&nbsp; client thread&nbsp; --------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----------&nbsp;&nbsp;&nbsp; server&nbsp; thread ----------- 
<p>&nbsp;&nbsp;&nbsp;&nbsp; printf(&quot; before L4_Send &quot;);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while(1)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n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bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function_A();
</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p>&nbsp; ----------&nbsp;&nbsp; client thread&nbsp; --------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----------&nbsp;&nbsp;&nbsp; server&nbsp; thread -----------</p>
<p>&nbsp;</p></span>
<p>server thread is L4 thread.</p>
<p>&nbsp;</p>
<p>When first client thread sends message to server and function_A never returns, the other two threads</p>
<p>&nbsp;</p>
<p>don&#39;t have the chance of running.</p>
<p>&nbsp;</p>
<p>You pointed that this problem might be due to the priority of threads.</p>
<p>&nbsp;</p>
<p>The priority of server thread is 200. </p>
<p>&nbsp;</p>
<p>In order to run the client threads and server thread concurrently, the priority of client threads should be 200.</p>
<p>&nbsp;</p>
<p>How can I set the priority of the client thread?</p></div>
<div>&nbsp;</div>
<div><span class="q"><br>-----?? ???-----<br><b>From:</b> &quot;Hal Ashburner&quot; &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:hala@ok-labs.com" target="_blank">hala@ok-labs.com</a>&gt;<br>
</span><b>From Date:</b> 2007-11-05 ?? 1:45:10<span class="q"><br><b>To:</b> &quot;Choi, SuGil&quot; &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:sooguri@etri.re.kr" target="_blank">sooguri@etri.re.kr
</a>&gt;<br></span><b>Cc:</b> &quot;developer&quot; &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:developer@okl4.org" target="_blank">developer@okl4.org</a>&gt;<br><b>Subject:</b> RE: Re: [okl4-developer] L4_Send and L4_Wait
<br><br>&nbsp;</div>
<div><span class="e" id="q_1160e6633fbcf0d8_7">
<div><br><br>
<p><font size="2">On Fri, 2007-11-02 at 17:01 +0900, Choi, SuGil wrote:<br>&gt;&nbsp;<br>&gt; Thanks for your help.<br>&gt;&nbsp;<br>&gt; The client thread is created in wombat linux kernel.<br>&gt;&nbsp;<br>&gt; How can I find out the priority of the client thread?
<br><br>Break into the kernel by issuing &quot;Ctrl + K&quot; in the console to get to the<br>L4 kernel debugger.<br>&quot;?&quot; will show you all the options, the one you want is &quot;q&quot;<br>which lists the current threads.
<br>The L4 threads in the linux kernel are &quot;L_syscall&quot; and &quot;L_timer&quot;<br><br><br>&gt; In addition, is the thread created in wombat kernel L4 thread?<br><br>What precisely do you mean when you say &quot;thread created&quot;
<br>What is the code you are using to create a thread?<br><br><br><br>&gt; SuGil.<br>&gt;<br>&gt; -----?? ???-----<br>&gt; From: &quot;Hal Ashburner&quot; &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:hala@ok-labs.com" target="_blank">
hala@ok-labs.com</a>&gt;<br>&gt; From Date: 2007-11-02 ?? 4:02:47<br>&gt; To: &quot;Choi, SuGil&quot; &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:sooguri@etri.re.kr" target="_blank">sooguri@etri.re.kr
</a>&gt;<br>&gt; Cc: &quot;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:developer@okl4.org" target="_blank">developer@okl4.org</a>&quot; &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:developer@okl4.org" target="_blank">
developer@okl4.org</a>&gt;<br>&gt; Subject: Re: [okl4-developer] L4_Send and L4_Wait<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; On Fri, 2007-11-02 at 15:38 +0900, Choi, SuGil wrote:<br>&gt; &gt; Hi,<br>&gt; &gt;<br>&gt; &gt;
<br>&gt; &gt;<br>&gt; &gt; I have difficulty in testing client server program.<br>&gt; &gt;<br>&gt; &gt;<br>&gt;<br>&gt; &lt;snip&gt;<br>&gt;<br>&gt; &gt;<br>&gt; &gt; When the function_A never returns (infinite loop), L4_Send is
<br>&gt; blocking<br>&gt; &gt; indefinitely<br>&gt; &gt;<br>&gt; &gt;<br>&gt;<br>&gt; &gt;<br>&gt; &gt; I want that the client thread can run as long as the sent&nbsp; message<br>&gt; is<br>&gt; &gt; received by the server<br>
&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; even if the function_A never returns. Could you please tell me what<br>&gt; I<br>&gt; &gt; have to do more.<br>&gt; &gt;<br>&gt;<br>&gt; &gt;<br>&gt; Hi SuGil.<br>&gt; Are the two threads the same priority?
<br>&gt; The behaviour you are seeing would be consistent with the thread<br>&gt; running<br>&gt; function_A being of a higher priority than the sending thread.<br>&gt;<br>&gt; Hope this helps.<br>&gt;<br>&gt; --<br>&gt; Kind regards,
<br>&gt; Hal Ashburner<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>--<br>Kind regards,<br>Hal Ashburner<br><br></font></p></div></span></div></div><img height="0" width="0"><br>_______________________________________________
<br>Developer mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Developer@okl4.org">Developer@okl4.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.okl4.org/mailman/listinfo/developer" target="_blank">
https://lists.okl4.org/mailman/listinfo/developer</a><br><br></blockquote></div><br>