mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-07 11:08:05 +02:00
drm: move some of the OS stuff into the OS header
This commit is contained in:
parent
d81bc78a04
commit
3664de7395
2 changed files with 15 additions and 14 deletions
|
|
@ -1288,19 +1288,5 @@ static inline void drm_ctl_free(void *pt, size_t size, int area)
|
|||
|
||||
/*@}*/
|
||||
|
||||
/** 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)
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue