Hi, Bernd Petrovitsch wrote:
Background: To preempt a task in the kernel within a driver, the driver must be able to live with that at the preemption point because the very same driver may be called for completely different tasks in between. So the driver writer has to make sure that - at the preemption point - his driver continues where he left independent of the different sys-calls to the his driver for different tasks, file-descriptors, etc. So you actually *must* program that into your driver (and there is basically no way around it since it depends also on the hardware/device which your drivers is responsible for (if and) how you implement this. This may be different in different drivers.). Therefore busy-waiting is basically evil and not to be done without good reason (and even then only for a very short time - as seen in kernel speed).
Yep, I agree.
The real-time people use RTAI and don't really care about the rest of the Linux kernel. Or do you mean the low-latency folks?
Yep, I meant the low-latency guys. Of course, for hard realtime constraints, one should go with RTAI or Adeos.
Sincerly, Thomas -- Thomas Petazzoni thomas.petazzoni@xxxxxxxx -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/