1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Add lfence().

MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2012-08-01 17:24:53 +00:00
parent 879eedbc7b
commit 0220d04fe3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=238972
2 changed files with 14 additions and 0 deletions

View File

@ -289,6 +289,13 @@ popcntq(u_long mask)
return (result);
}
static __inline void
lfence(void)
{
__asm __volatile("lfence" : : : "memory");
}
static __inline void
mfence(void)
{

View File

@ -154,6 +154,13 @@ cpu_mwait(u_long extensions, u_int hints)
__asm __volatile("mwait" : : "a" (hints), "c" (extensions));
}
static __inline void
lfence(void)
{
__asm __volatile("lfence" : : : "memory");
}
static __inline void
mfence(void)
{