summaryrefslogtreecommitdiffstats
path: root/sys/dev/drm2/radeon/radeon_sa.c
diff options
context:
space:
mode:
authordumbbell <dumbbell@FreeBSD.org>2013-12-22 21:18:21 +0000
committerdumbbell <dumbbell@FreeBSD.org>2013-12-22 21:18:21 +0000
commit088efa66e670049c8aaed85d41c6051704d7d9ad (patch)
tree518d2fe16a613579e18b8745b9bb0b20528494b1 /sys/dev/drm2/radeon/radeon_sa.c
parentd96320dc31e53fc9e70a8d6fcfa655d6bf2b5a1d (diff)
downloadFreeBSD-src-088efa66e670049c8aaed85d41c6051704d7d9ad.zip
FreeBSD-src-088efa66e670049c8aaed85d41c6051704d7d9ad.tar.gz
MFC r259684:
drm/ttm, drm/radeon: Replace EINTR/ERESTART by ERESTARTSYS... ... for msleep/cv_*wait() return values, where wait_event*() is used on Linux. ERESTARTSYS is the return code expected by callers when the operation was interrupted. For instance, this is the case of radeon_cs_ioctl() (radeon_cs.c): if an error occurs, and the code isn't ERESTARTSYS (eg. EINTR), it logs an error. Note that ERESTARTSYS is defined as ERESTART, but this keeps callers' code close to Linux. Submitted by: avg@ (previous version)
Diffstat (limited to 'sys/dev/drm2/radeon/radeon_sa.c')
-rw-r--r--sys/dev/drm2/radeon/radeon_sa.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/drm2/radeon/radeon_sa.c b/sys/dev/drm2/radeon/radeon_sa.c
index e750812..25695a4 100644
--- a/sys/dev/drm2/radeon/radeon_sa.c
+++ b/sys/dev/drm2/radeon/radeon_sa.c
@@ -363,6 +363,8 @@ int radeon_sa_bo_new(struct radeon_device *rdev,
while (!radeon_sa_event(sa_manager, size, align)) {
r = -cv_wait_sig(&sa_manager->wq,
&sa_manager->wq_lock);
+ if (r == -EINTR)
+ r = -ERESTARTSYS;
if (r != 0)
break;
}
OpenPOWER on IntegriCloud