Subversion Repositories Kolibri OS

Rev

Rev 1221 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1221 Rev 1222
Line 162... Line 162...
162
extern inline void usleep(u32_t delay)
162
extern inline void usleep(u32_t delay)
163
{
163
{
164
     if( !delay )
164
     if( !delay )
165
        delay++;
165
        delay++;
166
     delay*= 128;
166
     delay*= 256;
Line 167... Line 167...
167
 
167
 
168
     while(delay--)
-
 
169
     {
168
     while(delay--)
170
        __asm__ __volatile__(
169
        __asm__ __volatile__(
171
        "xorl %%eax, %%eax \n\t"
170
        "xorl %%eax, %%eax \n\t"
172
        "cpuid \n\t"
-
 
173
        "xorl %%eax, %%eax"
171
        "cpuid \n\t"
174
        :::"ebx","ecx","edx");
-
 
175
     };
172
        :::"eax","ebx","ecx","edx");
Line 176... Line 173...
176
};
173
     };
177
 
174
 
178
static inline void udelay(u32_t delay)
175
static inline void udelay(u32_t delay)
179
{
176
{
Line 180... Line 177...
180
    if(!delay) delay++;
177
    if(!delay) delay++;
181
    delay*= 128;
178
    delay*= 256;
182
 
179
 
183
    while(delay--)
180
    while(delay--)
184
    {
181
    {
185
        __asm__ __volatile__(
-
 
186
        "xorl %%eax, %%eax \n\t"
182
        __asm__ __volatile__(
187
        "cpuid \n\t"
183
        "xorl %%eax, %%eax \n\t"
188
        "xorl %%eax, %%eax"
184
        "cpuid"
Line 189... Line 185...
189
        :::"ebx","ecx","edx" );
185
        :::"eax","ebx","ecx","edx" );
190
    }
186
    }