<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: context switching during delays</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>Joel,</FONT>
</P>
<P><FONT SIZE=2>After the hello world task starts I call rtems_task_wake_after(1000) so I can debug it.</FONT>
<BR><FONT SIZE=2>BTW, I use rtems_task_wake_after() in the bsp_post_driver stuff and it works fine.</FONT>
</P>
<P><FONT SIZE=2>It gets to _Thread_Dispatch and then _Thread_Set_State and then when it calls</FONT>
<BR><FONT SIZE=2>_Thread_Calculate_heir, that's when _Thread_Heir gets corrupted (0xa5a5a5a5).</FONT>
<BR><FONT SIZE=2>Not sure yet if I am using the macros or the inline functions.</FONT>
</P>
<P><FONT SIZE=2>I suspect the problem is in _Priority_Get_highest but I am still tracing through it.</FONT>
<BR><FONT SIZE=2>It returns a value that is used as an array index so...</FONT>
</P>
<P><FONT SIZE=2>Thanks,</FONT>
<BR><FONT SIZE=2>Nick</FONT>
</P>
<BR>
<BR>
<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Joel Sherrill [<A HREF="mailto:joel.sherrill@OARcorp.com">mailto:joel.sherrill@OARcorp.com</A>]</FONT>
<BR><FONT SIZE=2>Sent: Tuesday, July 24, 2001 7:16 PM</FONT>
<BR><FONT SIZE=2>To: Hennenfent, Nick {AVL~Roswell}</FONT>
<BR><FONT SIZE=2>Cc: rtems-users@OARcorp.com</FONT>
<BR><FONT SIZE=2>Subject: Re: context switching during delays</FONT>
</P>
<P><FONT SIZE=2>Hello world does not configure a clock tick device driver</FONT>
<BR><FONT SIZE=2>and thus has no way to measure the passage of time. </FONT>
<BR><FONT SIZE=2>Once you do the context switch, you will end up</FONT>
<BR><FONT SIZE=2>in the idle task with no way to get out of it.</FONT>
</P>
<BR>
<P><FONT SIZE=2>--</FONT>
<BR><FONT SIZE=2>Joel Sherrill, Ph.D. Director of Research & Development</FONT>
<BR><FONT SIZE=2>joel@OARcorp.com On-Line Applications Research</FONT>
<BR><FONT SIZE=2>Ask me about RTEMS: a free RTOS Huntsville AL 35805</FONT>
<BR><FONT SIZE=2>Support Available (256) 722-9985</FONT>
</P>
</BODY>
</HTML>