This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
How to delay based on a non-system counter?
- From: Grant Edwards <grant dot b dot edwards at gmail dot com>
- To: ecos-discuss at sources dot redhat dot com
- Date: Wed, 24 Feb 2010 17:00:34 +0000 (UTC)
- Subject: [ECOS] How to delay based on a non-system counter?
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