[etherlab-dev] schedule_timeout() code issue

Andre Puschmann andre.puschmann at imms.de
Wed Mar 18 13:53:38 CET 2009

Hi list,

I got a question regarding the schedule_timeout(1) functionality used in 
master.c in ec_master_idle_thread() and ec_master_operation_thread().
The code calls schedule_timeout(1) which I interpret as "wait for a 
message but not longer then 10ms (assuming HZ==100) or 1ms (assuming 
I am new to EtherCAT and I am not sure about the desired functionality. 
Is it "wait for a very small amount of time" (which explains the 1) or 
is it wait for 10ms or 1ms?
I think in either way, defining the timeout with respect to HZ should be 
the better idea.
On the other hand, if HZ is set to 1000, one jiffie is relatively short. 
I am afraid if it's worth the extra costs of scheduling (i.e. context 
switches). In this case, calling a delay function without scheduling 
might be the better solution.
What do you think? Maybe I am completely wrong ..

Best regards,


More information about the Etherlab-dev mailing list