Hello, First thanks, for your response. >First, don't use usleep() unless it's absolutely necessary for more >than a very small number of microseconds. It's a busy-wait loop that >doesn't give up the CPU. Find some other way to trigger a task.
Are you sure usleep() is a busy-wait loop (so not freeing time for others tasks) ? I've take a look at the rtl_sched.c, where I don't understand all really... but it seems that the functions pthread_wait_np() and usleep() have nearly the same code, except of course for the value of timeout... so why usleep() would be a busy-wait loop? In my application, One of the tasks, is a periodic task driving a LCD display for menus. It is a periodic task (500ms). But when at the end I'm copying the display buffer to the LCD, when copying the caracters, I have to wait a BusyFlag between each. And in this wait-loop it could be interesting to insert a usleep() to free time for others tasks with less priority, instead of waiting and eating all the CPU time stupidly... Kind regards. --- Marc Le Douarain "[EMAIL PROTECTED]" http://www.multimania.com/mavati -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED] -- For more information on Real-Time Linux see: http://www.rtlinux.org/