* UP version is a degenerate case, used by kern_lock.o
Reported-by: Antonio Huete Jimenez <tuxillo@crater.dragonflybsd.org>
/*
* Attempt to obtain an exclusive spinlock. Returns FALSE on failure,
- * TRUE on success. Since the caller assumes that spinlocks must actually
- * work when using this function, it is only made available to SMP builds.
+ * TRUE on success.
*/
static __inline boolean_t
spin_trylock_wr(struct spinlock *mtx)
return (TRUE);
}
+#else
+
+static __inline boolean_t
+spin_trylock_wr(struct spinlock *mtx)
+{
+ globaldata_t gd = mycpu;
+
+ ++gd->gd_spinlocks_wr;
+ return (TRUE);
+}
+
#endif
/*