1402c59305
git-svn-id: svn://kolibrios.org@1408 a494cfbc-eb01-0410-851d-a64ba20cac60
30 lines
497 B
C
30 lines
497 B
C
/* stub */
|
|
|
|
static inline void mdelay(unsigned long time)
|
|
{
|
|
time /= 10;
|
|
if(!time) time = 1;
|
|
|
|
__asm__ __volatile__ (
|
|
"call *__imp__Delay"
|
|
::"b" (time));
|
|
__asm__ __volatile__ (
|
|
"":::"ebx");
|
|
|
|
};
|
|
|
|
static inline void udelay(unsigned long delay)
|
|
{
|
|
if(!delay) delay++;
|
|
delay*= 500;
|
|
|
|
while(delay--)
|
|
{
|
|
__asm__ __volatile__(
|
|
"xorl %%eax, %%eax \n\t"
|
|
"cpuid"
|
|
:::"eax","ebx","ecx","edx" );
|
|
}
|
|
}
|
|
|