This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cyg_thread_delay() trace!!


well, that is fine..but my cyg_thread_delay(x) call  does not return
back..i have used 2 periodic timer supported by the target board.timer1
for HAL_CLOCK_XXX macros and timer2 for hal_delay_us() function.

     plz give me some hints to trace this cyg_thread_delay problem and
how to solve this..?

thanks,
satish

On 11 Sep 2003 21:08:39 -0600
Gary Thomas <gary@mlbassoc.com> wrote:

> On Thu, 2003-09-11 at 21:02, Satish Kumar wrote:
> > Hi,
> >     i have programmed a timer for HAL_CLOCK_XXX routines..and when a 
> > cyg_thread_delay(x) is called in the twothreads.c program, therez no
> > response. my program hangs..!!
> >            can some body list out the trace how the HAL_CLOCK_XXXX
> > macros are called when i invoke a cyg_thread_delay(x) function. i m not
> > able to trace out clearly after it enters the sched.cxx file...
> 
> The call to 'cyg_thread_delay()' really has nothing to do with calls
> to HAL_CLOCK_XXX.  What happens is your thread will be suspended (unable
> to execute) pending the occurrence some number of clock ticks.  If there
> are no other threads which can run at this point, then the idle thread
> will be run.  In any case, when a clock interrupt occurs, 
> HAL_CLOCK_RESET() will be called as part of the processing and a tick
> will have taken place.  When enough ticks have gone by, your original 
> thread will be allowed to resume, thus returning from the 
> 'cyg_thread_delay()' call.  Pretty standard, interrupt driven 
> multi-threaded operations.
> 
> -- 
> Gary Thomas <gary@mlbassoc.com>
> MLB Associates

-- 
Satish Kumar <satish@bvt.sc.sanyo.co.jp>


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]