Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Mar 2003 12:37:46 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 26387 for review
Message-ID:  <200303052037.h25KbkQJ091439@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=26387

Change 26387 by jhb@jhb_laptop on 2003/03/05 12:36:48

	Revert previous optimizations since the armchair generals aren't
	happy with the semantics.

Affected files ...

.. //depot/projects/smpng/sys/sys/mutex.h#32 edit

Differences ...

==== //depot/projects/smpng/sys/sys/mutex.h#32 (text+ko) ====

@@ -254,8 +254,6 @@
 	_mtx_lock_flags((m), (opts), LOCK_FILE, LOCK_LINE)
 #define	mtx_unlock_flags(m, opts)					\
 	_mtx_unlock_flags((m), (opts), LOCK_FILE, LOCK_LINE)
-#define mtx_trylock_flags(m, opts)					\
-	_mtx_trylock((m), (opts), LOCK_FILE, LOCK_LINE)
 #define	mtx_lock_spin_flags(m, opts)					\
 	_mtx_lock_spin_flags((m), (opts), LOCK_FILE, LOCK_LINE)
 #define	mtx_unlock_spin_flags(m, opts)					\
@@ -265,8 +263,6 @@
 	_get_sleep_lock((m), curthread, (opts), LOCK_FILE, LOCK_LINE)
 #define	mtx_unlock_flags(m, opts)					\
 	_rel_sleep_lock((m), curthread, (opts), LOCK_FILE, LOCK_LINE)
-#define mtx_trylock_flags(m, opts)					\
-	(_obtain_lock((m), curthread))
 #ifndef SMPnotyet
 #define	mtx_lock_spin_flags(m, opts)					\
 	_get_spin_lock((m), curthread, (opts), LOCK_FILE, LOCK_LINE)
@@ -278,6 +274,9 @@
 #endif	/* SMP */
 #endif	/* LOCK_DEBUG */
 
+#define mtx_trylock_flags(m, opts)					\
+	_mtx_trylock((m), (opts), LOCK_FILE, LOCK_LINE)
+
 #define	mtx_initialized(m)	((m)->mtx_object.lo_flags & LO_INITIALIZED)
 
 #define mtx_owned(m)	(((m)->mtx_lock & MTX_FLAGMASK) == (uintptr_t)curthread)

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




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