This is the mail archive of the
ecos-discuss@sourceware.cygnus.com
mailing list for the eCos project.
Re: Unix friendly Idle loop
- To: lunn at ma dot tech dot ascom dot ch
- Subject: [ECOS] Re: Unix friendly Idle loop
- From: Bart Veer <bartv at cygnus dot co dot uk>
- Date: Wed, 29 Sep 1999 12:18:34 +0100
- CC: ecos-discuss at sourceware dot cygnus dot com
- References: <199909290721.JAA02736@biferten.ma.tech.ascom.ch>
- Reply-to: bartv at cygnus dot co dot uk
>>>>> "Andrew" == Andrew Lunn <lunn@ma.tech.ascom.ch> writes:
Andrew> When the Synthetic target executes the idle thread it
Andrew> spins, eating the CPU. Could this be made a bit more
Andrew> friendly to other processes?
Andrew> I thought about installing a function in the
Andrew> HAL_IDLE_THREAD_ACTION
Andrew> which calls select(2).
Andrew> Is this likly to break anything?
Another possibility would be to do a nice() or setpriority() system
call during the synthetic target startup code. This would still be
annoying if you are running something like SETI@home in the
background, but otherwise it should do pretty much what you need.
Bart Veer // eCos net maintainer