Morten Rønseth wrote: Looks good - but what are jiffies....? I remember the ads from times long past, about "jiffies", in the UK - cannot possibly be a connection here...! :-) (I'll say no more)hehe I'm betting your UK jiffies are somewhat similar to US quickies. In the kernel, they have a much more mundane definition though. A jiffy is an arbitrary unit of scheduled kernel time defined at compile time. The kernel runs HZ (a constant) number of jiffies per second. In most modern kernels HZ is defined as 1000, so a jiffy is 1ms. Some kernels (I believe the 2.4 series, and some custom compiled 2.6) use HZ=100 so a jiffy is 10ms. In any case, the msleep takes ms as a parameter so the function has to convert it to jiffies so the kernel knows how many loops we want to sleep through. I just pulled the code from the original 2.6.8 patch that added the function, but that's the gist. |