/*
 * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
 * Use is subject to license terms.
 */

#ifndef _ASM_CPU_H
#define	_ASM_CPU_H

#pragma ident	"@(#)cpu.h	1.1	04/09/28 SMI"

#ifdef	__cplusplus
extern "C" {
#endif

#if !defined(__lint) && defined(__GNUC__)

#if defined(__i386) || defined(__amd64)

extern __inline__ void ht_pause(void)
{
	__asm__ __volatile__(
	    "pause");
}

extern __inline__ void cli(void)
{
	__asm__ __volatile__(
	    "cli" : : : "memory");
}

extern __inline__ void sti(void)
{
	__asm__ __volatile__(
	    "sti");
}

extern __inline__ void i86_halt(void)
{
	__asm__ __volatile__(
	    "sti; hlt");
}

#endif	/* __i386 || defined(__amd64) */

#endif	/* !__lint && __GNUC__ */

#ifdef	__cplusplus
}
#endif

#endif	/* _ASM_CPU_H */
