Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-7]: src/sys/external/bsd/drm2/include/linux Pull up following rev...



details:   https://anonhg.NetBSD.org/src/rev/dbca3ce8306d
branches:  netbsd-7
changeset: 798363:dbca3ce8306d
user:      snj <snj%NetBSD.org@localhost>
date:      Sun Sep 21 18:31:06 2014 +0000

description:
Pull up following revision(s) (requested by riastradh in ticket #102):
        sys/external/bsd/drm2/include/linux/ww_mutex.h: revisions 1.5, 1.6
Use KASSERTMSG in ww_acquire_fini to show number of locks held.
Omit vestigial notes on porting before the API was made to match.

diffstat:

 sys/external/bsd/drm2/include/linux/ww_mutex.h |  16 +++-------------
 1 files changed, 3 insertions(+), 13 deletions(-)

diffs (37 lines):

diff -r ecb562454ec9 -r dbca3ce8306d sys/external/bsd/drm2/include/linux/ww_mutex.h
--- a/sys/external/bsd/drm2/include/linux/ww_mutex.h    Sun Sep 21 18:22:22 2014 +0000
+++ b/sys/external/bsd/drm2/include/linux/ww_mutex.h    Sun Sep 21 18:31:06 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ww_mutex.h,v 1.4 2014/07/26 21:36:40 riastradh Exp $   */
+/*     $NetBSD: ww_mutex.h,v 1.4.4.1 2014/09/21 18:31:06 snj Exp $     */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -29,17 +29,6 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-/*
- * Notes on porting:
- *
- * - We require a context for all locks, so ww_mutex_lock(m, NULL) is
- *   not kosher.  Locking without a context is too painful to
- *   contemplate.
- *
- * - We require passing the context to trylock and unlock.  Unlocking
- *   the wrong lock is too serious an error to pass up detection.
- */
-
 #ifndef _ASM_WW_MUTEX_H_
 #define _ASM_WW_MUTEX_H_
 
@@ -119,7 +108,8 @@
 ww_acquire_fini(struct ww_acquire_ctx *ctx)
 {
 
-       KASSERT(ctx->wwx_acquired == 0);
+       KASSERTMSG((ctx->wwx_acquired == 0), "ctx %p still holds %u locks",
+           ctx, ctx->wwx_acquired);
        ctx->wwx_acquired = ~0U;        /* Fail if called again. */
 }
 



Home | Main Index | Thread Index | Old Index