This is the mail archive of the
mailing list for the eCos project.
Re: [ECOS] periodic threads with kapi?
On Tue, Aug 19, 2003 at 05:21:45PM +0100, Robert Cragie wrote:
> I'm struggling to see what is wrong with using an alarm, associated DSR and
> a semaphore, and then simply looping on the semaphore in the periodic thread
> as Nick suggested. I personally don't want to see extra code in the code
> base unless it's absolutely necessary.
Why have a cyg_thread_delay function if you can just set up a one shot alarm
each time you want to delay? Because it's more convenient and keeps
application code cleaner. It's hard to argue that something is absolutely
necessary, because in reality ecos itself is not absolutely necessary.
People use an RTOS because they don't want to have to code all the things an
RTOS does themselves. I don't want to have to set up alarms and DSR's every
time I create a new periodic thread.
What if it was configurable as something like