[ros-dev] Race Condition?

KJK::Hyperion noog at libero.it
Mon Nov 8 12:14:39 CET 2004

At 16.57 05/11/2004, you wrote:
>P.S. The thread dispatching that is currently in Ps should be moved to Ke.

Fun fact about the scheduler: the reason there's both KeXxx and PsXxx 
scheduling functions, and both KTHREAD and ETHREAD, is yet other leftover 
from the initial microkernel design. Basically, KeXxx is the kerner proper 
(the rest of the kernel is called "executive"), in the microkernel sense of 
the term: it only does scheduling and obscure low-level 
architecture-specific stuff. It doesn't care about how are threads created, 
how are they maintained alive and when they are destroyed: it just requires 
its subsystems to please hold the dispatcher lock while they add or remove 
threads to its queues. It effectively allows for multiple kernels to 
coexist with the same scheduler (provided they have a way to share hardware 
resources). Keep this in mind when you read our spaghetti code that happily 
mixes Ps and Ke together :-P 

More information about the Ros-dev mailing list