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:
parent
17cf149804
commit
a78a421de8
@ -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();
|
||||
|
@ -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)
|
||||
;
|
||||
|
@ -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)
|
||||
;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user