This is the mail archive of the ecos-discuss@sourceware.org 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 doesn't seem to be working


On 2010-06-01, Aziz Bodal <azizbodal@gmail.com> wrote:

> I am trying to used the cyg_thread_delay function in my cyg_user_start
> function however it does not seem applying the delay. I am running the
> following snippet and I do not see the output of cyg_current_time()
> incrementing or even pausing. The cyg_current_time() always seems to
> be 0 when I try to output it using printf.  What am I doing wrong?

You can't use those routines in cyg_user_start() where the scheduler
and timer interrupt system aren't running.  Those only start after
cyg_user_start() returns.

Many years ago, there was a "System Startup chapter in the manual that
explained that sort of thing:

http://ecos.sourceware.org/docs-1.1/ref/ecos-ref/system-startup-cyg-user-start.html

But, that seems to be gone now.

The info on what you can do from cyg_user_start is now found in the
reference manual's "Kernel Overview" Chapter in a section on "Calling
Contexts". Unfortunately, the docs don't have any section numbering
scheme, so it's rather hard to cite them.

-- 
Grant


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


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