context switching during delays

Hennenfent, Nick {AVL~Roswell} NICK.HENNENFENT at ROCHE.COM
Wed Jul 25 16:23:52 UTC 2001


On a more philosophical note, I need to do short delays in some of my device
drivers.

Say 1/10 of a second.

What is the appropriate routine to use???
Should I use a busy/spin loop or should I use something that context
switches???

sleep()
nanosleep()
rtems_task_wake_after()
Something else???

Thanks,
Nick



-----Original Message-----
From: Joel Sherrill [mailto:joel.sherrill at OARcorp.com]
Sent: Tuesday, July 24, 2001 7:16 PM
To: Hennenfent, Nick {AVL~Roswell}
Cc: rtems-users at OARcorp.com
Subject: Re: context switching during delays

Hello world does not configure a clock tick device driver
and thus has no way to measure the passage of time. 
Once you do the context switch, you will end up
in the idle task with no way to get out of it.


--
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20010725/a3ae6610/attachment-0001.html>


More information about the users mailing list