mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-01-04 02:50:20 +01:00
Revert last commit, it affect via things
This commit is contained in:
parent
a08343e3e0
commit
b0c461c8e3
1 changed files with 20 additions and 7 deletions
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
#include <linux/interrupt.h> /* For task queue support */
|
||||
#include <linux/delay.h>
|
||||
#include <linux/wait.h>
|
||||
|
||||
/** File pointer type */
|
||||
#define DRMFILE struct file *
|
||||
|
|
@ -146,12 +145,26 @@ do { \
|
|||
|
||||
#define DRM_WAIT_ON( ret, queue, timeout, condition ) \
|
||||
do { \
|
||||
long __ret; \
|
||||
__ret = wait_event_interruptible_timeout(queue, condition, timeout); \
|
||||
if (__ret == 0) \
|
||||
ret = -EBUSY; \
|
||||
else if (__ret == -ERESTARTSYS) \
|
||||
ret = -EINTR; \
|
||||
DECLARE_WAITQUEUE(entry, current); \
|
||||
unsigned long end = jiffies + (timeout); \
|
||||
add_wait_queue(&(queue), &entry); \
|
||||
\
|
||||
for (;;) { \
|
||||
__set_current_state(TASK_INTERRUPTIBLE); \
|
||||
if (condition) \
|
||||
break; \
|
||||
if (time_after_eq(jiffies, end)) { \
|
||||
ret = -EBUSY; \
|
||||
break; \
|
||||
} \
|
||||
schedule_timeout((HZ/100 > 1) ? HZ/100 : 1); \
|
||||
if (signal_pending(current)) { \
|
||||
ret = -EINTR; \
|
||||
break; \
|
||||
} \
|
||||
} \
|
||||
__set_current_state(TASK_RUNNING); \
|
||||
remove_wait_queue(&(queue), &entry); \
|
||||
} while (0)
|
||||
|
||||
#define DRM_WAKEUP( queue ) wake_up_interruptible( queue )
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue