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/drm_compat.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/drm_compat.h')
-rw-r--r-- | linux-core/drm_compat.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/linux-core/drm_compat.h b/linux-core/drm_compat.h index 03749d14..4f3a6688 100644 --- a/linux-core/drm_compat.h +++ b/linux-core/drm_compat.h @@ -195,6 +195,16 @@ static inline int remap_pfn_range(struct vm_area_struct *vma, unsigned long from } #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16) +#define mutex_lock down +#define mutex_unlock up + +#define mutex semaphore + +#define mutex_init(a) sema_init((a), 1) + +#endif + /* old architectures */ #ifdef __AMD64__ #define __x86_64__ |