X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/c910b4d9d2451126ae3917b931cd4390c11e1d52..e2fac8b15b12a7979f72090454d850e612fc5b13:/osfmk/i386/cpu.c diff --git a/osfmk/i386/cpu.c b/osfmk/i386/cpu.c index 1760eabf5..194a6576b 100644 --- a/osfmk/i386/cpu.c +++ b/osfmk/i386/cpu.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2008 Apple Inc. All rights reserved. + * Copyright (c) 2000-2009 Apple Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * @@ -141,9 +141,13 @@ cpu_exit_wait( { cpu_data_t *cdp = cpu_datap(cpu); + /* + * Wait until the CPU indicates that it has stopped. + */ simple_lock(&x86_topo_lock); while ((cdp->lcpu.state != LCPU_HALT) - && (cdp->lcpu.state != LCPU_OFF)) { + && (cdp->lcpu.state != LCPU_OFF) + && !cdp->lcpu.stopped) { simple_unlock(&x86_topo_lock); cpu_pause(); simple_lock(&x86_topo_lock);