Renamed sleep() to spin() as that's what it does, and sleep() also doesn't

like unistd.h.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9040 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-09-23 13:43:57 +00:00
parent 17cf149804
commit a78a421de8
3 changed files with 5 additions and 5 deletions

View File

@ -11,7 +11,7 @@
extern void clearscreen(void);
extern void kputs(const char *str);
extern int dprintf(const char *fmt, ...);
extern void sleep(uint64 time);
extern void spin(uint64 microseconds);
extern void execute_n_instructions(int count);
void system_time_setup(long a);
uint64 rdtsc();

View File

@ -398,7 +398,7 @@ smp_boot_all_cpus(kernel_args *ka)
;
/* wait 10ms */
sleep(10000);
spin(10000);
/* is this a local apic or an 82489dx ? */
num_startups = (ka->arch_args.cpu_apic_version[i] & 0xf0) ? 2 : 0;
@ -416,7 +416,7 @@ smp_boot_all_cpus(kernel_args *ka)
apic_write(APIC_ICR1, config);
/* wait */
sleep(200);
spin(200);
while ((apic_read(APIC_ICR1)& 0x00001000) == 0x00001000)
;

View File

@ -598,11 +598,11 @@ check_cpu(void)
void
sleep(uint64 time)
spin(uint64 microseconds)
{
uint64 start = system_time();
while(system_time() - start <= time)
while (system_time() - start <= microseconds)
;
}