convert to use __set_current_state, align some header includes
parent
33fbf8b7e2
commit
ea07fefcbf
|
@ -372,7 +372,7 @@ int drm_release(struct inode *inode, struct file *filp)
|
||||||
|
|
||||||
add_wait_queue(&dev->lock.lock_queue, &entry);
|
add_wait_queue(&dev->lock.lock_queue, &entry);
|
||||||
for (;;) {
|
for (;;) {
|
||||||
current->state = TASK_INTERRUPTIBLE;
|
__set_current_state(TASK_INTERRUPTIBLE);
|
||||||
if (!dev->lock.hw_lock) {
|
if (!dev->lock.hw_lock) {
|
||||||
/* Device has been unregistered */
|
/* Device has been unregistered */
|
||||||
retcode = -EINTR;
|
retcode = -EINTR;
|
||||||
|
@ -392,7 +392,7 @@ int drm_release(struct inode *inode, struct file *filp)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
current->state = TASK_RUNNING;
|
__set_current_state(TASK_RUNNING);
|
||||||
remove_wait_queue(&dev->lock.lock_queue, &entry);
|
remove_wait_queue(&dev->lock.lock_queue, &entry);
|
||||||
if (!retcode) {
|
if (!retcode) {
|
||||||
dev->driver->reclaim_buffers_locked(dev, filp);
|
dev->driver->reclaim_buffers_locked(dev, filp);
|
||||||
|
|
|
@ -80,7 +80,7 @@ int drm_lock(struct inode *inode, struct file *filp,
|
||||||
|
|
||||||
add_wait_queue(&dev->lock.lock_queue, &entry);
|
add_wait_queue(&dev->lock.lock_queue, &entry);
|
||||||
for (;;) {
|
for (;;) {
|
||||||
current->state = TASK_INTERRUPTIBLE;
|
__set_current_state(TASK_INTERRUPTIBLE);
|
||||||
if (!dev->lock.hw_lock) {
|
if (!dev->lock.hw_lock) {
|
||||||
/* Device has been unregistered */
|
/* Device has been unregistered */
|
||||||
ret = -EINTR;
|
ret = -EINTR;
|
||||||
|
@ -100,7 +100,7 @@ int drm_lock(struct inode *inode, struct file *filp,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
current->state = TASK_RUNNING;
|
__set_current_state(TASK_RUNNING);
|
||||||
remove_wait_queue(&dev->lock.lock_queue, &entry);
|
remove_wait_queue(&dev->lock.lock_queue, &entry);
|
||||||
|
|
||||||
DRM_DEBUG( "%d %s\n", lock.context, ret ? "interrupted" : "has lock" );
|
DRM_DEBUG( "%d %s\n", lock.context, ret ? "interrupted" : "has lock" );
|
||||||
|
|
|
@ -26,13 +26,12 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/interrupt.h> /* For task queue support */
|
|
||||||
#include <linux/delay.h>
|
|
||||||
|
|
||||||
#include "drmP.h"
|
#include "drmP.h"
|
||||||
#include "drm.h"
|
#include "drm.h"
|
||||||
#include "i830_drm.h"
|
#include "i830_drm.h"
|
||||||
#include "i830_drv.h"
|
#include "i830_drv.h"
|
||||||
|
#include <linux/interrupt.h> /* For task queue support */
|
||||||
|
#include <linux/delay.h>
|
||||||
|
|
||||||
irqreturn_t i830_driver_irq_handler(DRM_IRQ_ARGS)
|
irqreturn_t i830_driver_irq_handler(DRM_IRQ_ARGS)
|
||||||
{
|
{
|
||||||
|
@ -88,7 +87,7 @@ static int i830_wait_irq(drm_device_t * dev, int irq_nr)
|
||||||
add_wait_queue(&dev_priv->irq_queue, &entry);
|
add_wait_queue(&dev_priv->irq_queue, &entry);
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
current->state = TASK_INTERRUPTIBLE;
|
__set_current_state(TASK_INTERRUPTIBLE);
|
||||||
if (atomic_read(&dev_priv->irq_received) >= irq_nr)
|
if (atomic_read(&dev_priv->irq_received) >= irq_nr)
|
||||||
break;
|
break;
|
||||||
if ((signed)(end - jiffies) <= 0) {
|
if ((signed)(end - jiffies) <= 0) {
|
||||||
|
@ -108,7 +107,7 @@ static int i830_wait_irq(drm_device_t * dev, int irq_nr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
current->state = TASK_RUNNING;
|
__set_current_state(TASK_RUNNING);
|
||||||
remove_wait_queue(&dev_priv->irq_queue, &entry);
|
remove_wait_queue(&dev_priv->irq_queue, &entry);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue