Get rid of any remaining PZERO flags in mtx_sleep()

Also, clean up some ifdef mess while I'm here.

MFC after:	3 days
This commit is contained in:
rnoland 2009-03-16 08:19:11 +00:00
parent b65366a14a
commit 6822cdf607
3 changed files with 2 additions and 14 deletions

View File

@ -666,7 +666,7 @@ void drm_close(void *data)
}
/* Contention */
retcode = mtx_sleep((void *)&dev->lock.lock_queue,
&dev->dev_lock, PZERO | PCATCH, "drmlk2", 0);
&dev->dev_lock, PCATCH, "drmlk2", 0);
if (retcode)
break;
}

View File

@ -82,7 +82,7 @@ int drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv)
/* Contention */
ret = mtx_sleep((void *)&dev->lock.lock_queue, &dev->dev_lock,
PZERO | PCATCH, "drmlk2", 0);
PCATCH, "drmlk2", 0);
if (ret != 0)
break;
}

View File

@ -1708,26 +1708,14 @@ void radeon_do_release(struct drm_device * dev)
if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) {
while ((ret = r600_do_cp_idle(dev_priv)) != 0) {
DRM_DEBUG("radeon_do_cp_idle %d\n", ret);
#ifdef __linux__
schedule();
#elsif defined(__FreeBSD__)
mtx_sleep(&ret, &dev->dev_lock, 0,
"rdnrel", 1);
#else
tsleep(&ret, PZERO, "rdnrel", 1);
#endif
}
} else {
while ((ret = radeon_do_cp_idle(dev_priv)) != 0) {
DRM_DEBUG("radeon_do_cp_idle %d\n", ret);
#ifdef __linux__
schedule();
#elsif defined(__FreeBSD__)
mtx_sleep(&ret, &dev->dev_lock, 0,
"rdnrel", 1);
#else
tsleep(&ret, PZERO, "rdnrel", 1);
#endif
}
}
if ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R600) {