diff options
author | dumbbell <dumbbell@FreeBSD.org> | 2013-12-22 21:18:21 +0000 |
---|---|---|
committer | dumbbell <dumbbell@FreeBSD.org> | 2013-12-22 21:18:21 +0000 |
commit | 088efa66e670049c8aaed85d41c6051704d7d9ad (patch) | |
tree | 518d2fe16a613579e18b8745b9bb0b20528494b1 /sys/dev/drm2/ttm/ttm_bo.c | |
parent | d96320dc31e53fc9e70a8d6fcfa655d6bf2b5a1d (diff) | |
download | FreeBSD-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/ttm/ttm_bo.c')
-rw-r--r-- | sys/dev/drm2/ttm/ttm_bo.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/drm2/ttm/ttm_bo.c b/sys/dev/drm2/ttm/ttm_bo.c index 3b13540..88f374e 100644 --- a/sys/dev/drm2/ttm/ttm_bo.c +++ b/sys/dev/drm2/ttm/ttm_bo.c @@ -147,6 +147,8 @@ ttm_bo_wait_unreserved_locked(struct ttm_buffer_object *bo, bool interruptible) } while (ttm_bo_is_reserved(bo)) { ret = -msleep(bo, &bo->glob->lru_lock, flags, wmsg, 0); + if (ret == -EINTR) + ret = -ERESTARTSYS; if (ret != 0) break; } |