svn commit: r336095 - head/sys/sys
Matt Macy
mmacy at FreeBSD.org
Sun Jul 8 19:35:30 UTC 2018
Author: mmacy
Date: Sun Jul 8 19:35:29 2018
New Revision: 336095
URL: https://svnweb.freebsd.org/changeset/base/336095
Log:
critical_{enter, exit}: add missing compiler barrier
Reported by: markj
Modified:
head/sys/sys/systm.h
Modified: head/sys/sys/systm.h
==============================================================================
--- head/sys/sys/systm.h Sun Jul 8 18:44:42 2018 (r336094)
+++ head/sys/sys/systm.h Sun Jul 8 19:35:29 2018 (r336095)
@@ -238,6 +238,7 @@ critical_enter(void)
td = (struct thread_lite *)curthread;
td->td_critnest++;
+ __compiler_membar();
}
static __inline void
@@ -248,6 +249,7 @@ critical_exit(void)
td = (struct thread_lite *)curthread;
KASSERT(td->td_critnest != 0,
("critical_exit: td_critnest == 0"));
+ __compiler_membar();
td->td_critnest--;
__compiler_membar();
if (__predict_false(td->td_owepreempt))
More information about the svn-src-head
mailing list