[ECOS] How to delay based on a non-system counter?

Grant Edwards grant.b.edwards@gmail.com
Wed Feb 24 17:00:00 GMT 2010


Is there a simple way to delay for a number of ticks on a
non-system counter?  What I need is something equivalent to
cyg_thread_delay() where I can specify the counter handle
that's to be used for the delay.

I could create an alarm handle&object, an alarm handler, and a
semaphore, and then set up the alarm handler to signal the
semaphore, schedule and enable the alarm, then block on the
semaphore/flag.  But that seems like a lot of overhead --
especially when the cyg_thread_delay_counter() call needs to be
thread-safe.

-- 
Grant Edwards                   grante             Yow! FUN is never having to
                                  at               say you're SUSHI!!
                               visi.com            


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



More information about the Ecos-discuss mailing list