Source-Changes-HG archive

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

[src/riastradh-drm2]: src/sys/external/bsd/drm2/include/linux Add assert_spin...



details:   https://anonhg.NetBSD.org/src/rev/e63587f0ac15
branches:  riastradh-drm2
changeset: 788485:e63587f0ac15
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Jul 24 04:01:05 2013 +0000

description:
Add assert_spin_locked to <linux/spinlock.h>.

diffstat:

 sys/external/bsd/drm2/include/linux/spinlock.h |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (18 lines):

diff -r 43b453ca38d8 -r e63587f0ac15 sys/external/bsd/drm2/include/linux/spinlock.h
--- a/sys/external/bsd/drm2/include/linux/spinlock.h    Wed Jul 24 04:00:51 2013 +0000
+++ b/sys/external/bsd/drm2/include/linux/spinlock.h    Wed Jul 24 04:01:05 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: spinlock.h,v 1.1.2.7 2013/07/24 03:50:30 riastradh Exp $       */
+/*     $NetBSD: spinlock.h,v 1.1.2.8 2013/07/24 04:01:05 riastradh Exp $       */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -100,4 +100,8 @@
        mutex_destroy(&spinlock->sl_lock);
 }
 
+/* This is a macro to make the panic message clearer.  */
+#define        assert_spin_locked(spinlock)    \
+       KASSERT(mutex_owned(&(spinlock)->sl_lock))
+
 #endif  /* _LINUX_SPINLOCK_H_ */



Home | Main Index | Thread Index | Old Index