aboutsummaryrefslogtreecommitdiff
path: root/linux-core/drm_os_linux.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2007-11-05 12:10:52 +1000
committerDave Airlie <airlied@linux.ie>2007-11-05 12:11:39 +1000
commit3664de73955aafe912318c91717ff9ecc1027af2 (patch)
treec87551edcc419fe83dc520fe04a5f0768566de92 /linux-core/drm_os_linux.h
parentd81bc78a04f3b72bdf2600158cea084223a3a682 (diff)
drm: move some of the OS stuff into the OS header
Diffstat (limited to 'linux-core/drm_os_linux.h')
-rw-r--r--linux-core/drm_os_linux.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/linux-core/drm_os_linux.h b/linux-core/drm_os_linux.h
index 2688479a..84c294e1 100644
--- a/linux-core/drm_os_linux.h
+++ b/linux-core/drm_os_linux.h
@@ -129,3 +129,18 @@ do { \
#define DRM_WAKEUP( queue ) wake_up_interruptible( queue )
#define DRM_INIT_WAITQUEUE( queue ) init_waitqueue_head( queue )
+
+/** Type for the OS's non-sleepable mutex lock */
+#define DRM_SPINTYPE spinlock_t
+/**
+ * Initialize the lock for use. name is an optional string describing the
+ * lock
+ */
+#define DRM_SPININIT(l,name) spin_lock_init(l)
+#define DRM_SPINUNINIT(l)
+#define DRM_SPINLOCK(l) spin_lock(l)
+#define DRM_SPINUNLOCK(l) spin_unlock(l)
+#define DRM_SPINLOCK_IRQSAVE(l, _flags) spin_lock_irqsave(l, _flags);
+#define DRM_SPINUNLOCK_IRQRESTORE(l, _flags) spin_unlock_irqrestore(l, _flags);
+#define DRM_SPINLOCK_ASSERT(l) do {} while (0)
+