On 02/04/2012 12:40 AM, lakshminarayana babu wrote:
I am using motorola MCF5485 processor board. We have ported linux
2.6.25 kernel downloaded from LTIB. . I have written a small
application program using "nanosleep". If i give a delay of 100
milliseconds it is giving 120 miliseconds. Like this whatever may the
amount i am giving in this function it is adding 20 milliseconds
extra. I tried with "usleep" and "sleep" also. In both the cases
same problem. Can you please help me out.
1) replying to a digest email in the list is not good - you've hijacked
an email thread and leave a lot of us trying to figure out the context
of your questions.
2) using nansleep from a userspace application either has the userspace
trying to sleep (while the scheduler is still running), or it invkes a
system call to do the same, either of which can easily add at least one
tick to the delay; sleeps of that short a duration should only be done
within the kernel - sounds like you're trying to do in userspace
application what should be done in the kernel (i.e. hardware driver?).
What is it you're really trying to do that requires a sleep of that
short a duration???
--
Peter Barada
[email protected]
_______________________________________________
LTIB home page: http://ltib.org
Ltib mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/ltib