Re: delay related functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It looks like udelay is implemented on top of __const_udelay or __udelay(); If you supply constant value, it calls __const_udelay otherwise it calls __udelay.

Since udelay family is pseudo delay function simulated by loop instruction for n number of times, there are chances that compiler might optimize away the busy looping code with some compile time deterministic number of loops. In case of a variable, compiler may not have sufficient information for this optimization.

In anycase, one should use udelay() and what it does is its internal magic that should not effect users.

Thanks,
Rajat

On Wed, Oct 27, 2010 at 12:05 PM, J.H.Kim <frog1120@xxxxxxxxx> wrote:
Hi, everyone

What is the difference among udelay(), const_udelay() and __delay() ?


Thansk in advance.

Best Regards,
J.Hwan Kim

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux