CpuSleepGcc.c revision 4fd606d1f5abe38e1f42c38de1d2e895166bd0f4
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync/** @file
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync CpuSleep function for Ia32/X64 GCC.
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
c58f1213e628a545081c70e26c6b67a841cff880vboxsync This program and the accompanying materials
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync are licensed and made available under the terms and conditions of the BSD License
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync which accompanies this distribution. The full text of the license may be found at
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync http://opensource.org/licenses/bsd-license.php.
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync**/
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync/**
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync Places the CPU in a sleep state until an interrupt is received.
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync Places the CPU in a sleep state until an interrupt is received. If interrupts
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync are disabled prior to calling this function, then the CPU will be placed in a
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync sleep state indefinitely.
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync**/
e62cb87bae732e9968199a3ad153cc94004b7182vboxsyncVOID
e62cb87bae732e9968199a3ad153cc94004b7182vboxsyncEFIAPI
e62cb87bae732e9968199a3ad153cc94004b7182vboxsyncCpuSleep (
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync VOID
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync )
e62cb87bae732e9968199a3ad153cc94004b7182vboxsync{
__asm__ __volatile__ ("hlt"::: "memory");
}