svn commit: r324803 - head/sys/kern
Mateusz Guzik
mjg at FreeBSD.org
Fri Oct 20 14:04:03 UTC 2017
Author: mjg
Date: Fri Oct 20 14:04:01 2017
New Revision: 324803
URL: https://svnweb.freebsd.org/changeset/base/324803
Log:
mtx: fix up UP build after r324778
Reported by: Michael Butler
Modified:
head/sys/kern/kern_mutex.c
Modified: head/sys/kern/kern_mutex.c
==============================================================================
--- head/sys/kern/kern_mutex.c Fri Oct 20 11:07:51 2017 (r324802)
+++ head/sys/kern/kern_mutex.c Fri Oct 20 14:04:01 2017 (r324803)
@@ -289,7 +289,9 @@ __mtx_lock_spin_flags(volatile uintptr_t *c, int opts,
int line)
{
struct mtx *m;
+#ifdef SMP
uintptr_t tid, v;
+#endif
m = mtxlock2mtx(c);
@@ -306,6 +308,7 @@ __mtx_lock_spin_flags(volatile uintptr_t *c, int opts,
opts &= ~MTX_RECURSE;
WITNESS_CHECKORDER(&m->lock_object, opts | LOP_NEWORDER | LOP_EXCLUSIVE,
file, line, NULL);
+#ifdef SMP
spinlock_enter();
tid = (uintptr_t)curthread;
v = MTX_UNOWNED;
@@ -314,6 +317,9 @@ __mtx_lock_spin_flags(volatile uintptr_t *c, int opts,
else
LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(spin__acquire,
m, 0, 0, file, line);
+#else
+ __mtx_lock_spin(m, curthread, opts, file, line);
+#endif
LOCK_LOG_LOCK("LOCK", &m->lock_object, opts, m->mtx_recurse, file,
line);
WITNESS_LOCK(&m->lock_object, opts | LOP_EXCLUSIVE, file, line);
More information about the svn-src-all
mailing list