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/drm Add DRM_WAITERS_P...
details: https://anonhg.NetBSD.org/src/rev/98c66096d382
branches: riastradh-drm2
changeset: 788298:98c66096d382
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jul 24 03:08:03 2013 +0000
description:
Add DRM_WAITERS_P and DRM_SPIN_WAITERS_P to drm_wait_netbsd.h.
diffstat:
sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diffs (37 lines):
diff -r 9819f974c0c7 -r 98c66096d382 sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h
--- a/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h Wed Jul 24 03:07:48 2013 +0000
+++ b/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h Wed Jul 24 03:08:03 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_wait_netbsd.h,v 1.1.2.5 2013/07/24 02:36:31 riastradh Exp $ */
+/* $NetBSD: drm_wait_netbsd.h,v 1.1.2.6 2013/07/24 03:08:03 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -57,6 +57,13 @@
cv_destroy(q);
}
+static inline bool
+DRM_WAITERS_P(drm_waitqueue_t *q, struct mutex *interlock)
+{
+ KASSERT(mutex_is_locked(interlock));
+ return cv_has_waiters(q);
+}
+
static inline void
DRM_WAKEUP_ONE(drm_waitqueue_t *q, struct mutex *interlock)
{
@@ -71,6 +78,13 @@
cv_broadcast(q);
}
+static inline bool
+DRM_SPIN_WAITERS_P(drm_waitqueue_t *q, spinlock_t *interlock)
+{
+ KASSERT(spin_is_locked(interlock));
+ return cv_has_waiters(q);
+}
+
static inline void
DRM_SPIN_WAKEUP_ONE(drm_waitqueue_t *q, spinlock_t *interlock)
{
Home |
Main Index |
Thread Index |
Old Index