diff options
author | Dave Airlie <airlied@linux.ie> | 2006-07-24 10:51:27 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2006-07-24 10:51:27 +1000 |
commit | 5cfbd5dbab4fe9668771377cb22da04c6103459e (patch) | |
tree | 375d460ab42628fbe57bb669d6e0710bf2fc3078 /linux-core/drmP.h | |
parent | 6677e2a10b820a5ccfd375cc627b8e41453a71da (diff) |
switch drm to use Linux mutexes instead of semaphore.
I hope the fallback compat code works if not shout at me.
Diffstat (limited to 'linux-core/drmP.h')
-rw-r--r-- | linux-core/drmP.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h index fb0ba482..6cbb810f 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -55,6 +55,9 @@ #include <linux/smp_lock.h> /* For (un)lock_kernel */ #include <linux/mm.h> #include <linux/pagemap.h> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) +#include <linux/mutex.h> +#endif #if defined(__alpha__) || defined(__powerpc__) #include <asm/pgtable.h> /* For pte_wrprotect */ #endif @@ -650,7 +653,7 @@ typedef struct drm_device { /** \name Locks */ /*@{ */ spinlock_t count_lock; /**< For inuse, drm_device::open_count, drm_device::buf_use */ - struct semaphore struct_sem; /**< For others */ + struct mutex struct_mutex; /**< For others */ /*@} */ /** \name Usage Counters */ @@ -687,7 +690,7 @@ typedef struct drm_device { /*@{ */ drm_ctx_list_t *ctxlist; /**< Linked list of context handles */ int ctx_count; /**< Number of context handles */ - struct semaphore ctxlist_sem; /**< For ctxlist */ + struct mutex ctxlist_mutex; /**< For ctxlist */ drm_map_t **context_sareas; /**< per-context SAREA's */ int max_context; |