1 /*===---- mwaitxintrin.h - MONITORX/MWAITX intrinsics ----------------------===
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 * See https://llvm.org/LICENSE.txt for license information.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 *===-----------------------------------------------------------------------===
11 #error "Never use <mwaitxintrin.h> directly; include <x86intrin.h> instead."
14 #ifndef __MWAITXINTRIN_H
15 #define __MWAITXINTRIN_H
17 /* Define the default attributes for the functions in this file. */
18 #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("mwaitx")))
19 static __inline__ void __DEFAULT_FN_ATTRS
20 _mm_monitorx(void const * __p, unsigned __extensions, unsigned __hints)
22 __builtin_ia32_monitorx((void *)__p, __extensions, __hints);
25 static __inline__ void __DEFAULT_FN_ATTRS
26 _mm_mwaitx(unsigned __extensions, unsigned __hints, unsigned __clock)
28 __builtin_ia32_mwaitx(__extensions, __hints, __clock);
31 #undef __DEFAULT_FN_ATTRS
33 #endif /* __MWAITXINTRIN_H */