Subversion Repositories Kolibri OS

Rev

Rev 1964 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. /* stub */
  2.  
  3. static inline void mdelay(unsigned long time)
  4. {
  5.     time /= 10;
  6.     if(!time) time = 1;
  7.  
  8.      __asm__ __volatile__ (
  9.      "call *__imp__Delay"
  10.      ::"b" (time));
  11.      __asm__ __volatile__ (
  12.      "":::"ebx");
  13.  
  14. };
  15.  
  16. static inline void udelay(unsigned long delay)
  17. {
  18.     if(!delay) delay++;
  19.     delay*= 500;
  20.  
  21.     while(delay--)
  22.     {
  23.         __asm__ __volatile__(
  24.         "xorl %%eax, %%eax \n\t"
  25.         "cpuid"
  26.         :::"eax","ebx","ecx","edx" );
  27.     }
  28. }
  29.  
  30.