Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Jul 2018 19:35:29 +0000 (UTC)
From:      Matt Macy <mmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r336095 - head/sys/sys
Message-ID:  <201807081935.w68JZTU4058928@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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))



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807081935.w68JZTU4058928>