This is the mail archive of the ecos-discuss@sourceware.cygnus.com 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]

Re: Unix friendly Idle loop


>>>>> "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

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