Removed sleep(), it now uses spin() from cpu.cpp - which is the exact same thing anyway.
This fixes the build as unistd.h defined sleep() as well. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9108 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -50,16 +50,6 @@ static struct mp_flt_struct *mp_flt_ptr = NULL;
|
|||||||
static int smp_get_current_cpu(void);
|
static int smp_get_current_cpu(void);
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
sleep(uint64 time)
|
|
||||||
{
|
|
||||||
uint64 start = system_time();
|
|
||||||
|
|
||||||
while(system_time() - start <= time)
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static uint32
|
static uint32
|
||||||
map_page(uint32 paddr, uint32 vaddr)
|
map_page(uint32 paddr, uint32 vaddr)
|
||||||
{
|
{
|
||||||
@@ -427,7 +417,7 @@ smp_boot_all_cpus(void)
|
|||||||
;
|
;
|
||||||
|
|
||||||
/* wait 10ms */
|
/* wait 10ms */
|
||||||
sleep(10000);
|
spin(10000);
|
||||||
|
|
||||||
/* is this a local apic or an 82489dx ? */
|
/* is this a local apic or an 82489dx ? */
|
||||||
num_startups = (gKernelArgs.arch_args.cpu_apic_version[i] & 0xf0) ? 2 : 0;
|
num_startups = (gKernelArgs.arch_args.cpu_apic_version[i] & 0xf0) ? 2 : 0;
|
||||||
@@ -445,7 +435,7 @@ smp_boot_all_cpus(void)
|
|||||||
apic_write(APIC_ICR1, config);
|
apic_write(APIC_ICR1, config);
|
||||||
|
|
||||||
/* wait */
|
/* wait */
|
||||||
sleep(200);
|
spin(200);
|
||||||
|
|
||||||
while ((apic_read(APIC_ICR1)& 0x00001000) == 0x00001000)
|
while ((apic_read(APIC_ICR1)& 0x00001000) == 0x00001000)
|
||||||
;
|
;
|
||||||
|
|||||||
Reference in New Issue
Block a user