Max. Value that could be passed to an udelay() function
Hi
Is there any limit in the value that we pass as argument to an udelay() function???i.e can we specify something like this:udelay(2000)?? With Regds Ananth |
It's at least the unsigned long max value, 2000 would be OK, more over, depending on your kernel, this value could be rounded (up or down, don't remember) to the closest jiffy value.
|
Oh sorry, I was thinking about usleep... So in fact that's true, you must use the good delay function, depending on the time you want to sleep: ndelay for ns, udelay for us and mdealy for ms scale, so use "mdelay (2)" instead. BUT it's a busy waiting, that means that noting else can be done during this time, you'd better use (if possible) one of the "sleep" family functions. look here: http://lwn.net/Kernel/LDD3/ chapter 7
|
All times are GMT -5. The time now is 02:51 PM. |