From 02445eab6432709abe2b06020c014be527d58ead Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sun, 4 Jan 2009 17:37:18 -0800 Subject: intel: Retry pin ioctl on -EINTR. --- libdrm/intel/intel_bufmgr_gem.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libdrm/intel/intel_bufmgr_gem.c b/libdrm/intel/intel_bufmgr_gem.c index c510e5eb..7b821de8 100644 --- a/libdrm/intel/intel_bufmgr_gem.c +++ b/libdrm/intel/intel_bufmgr_gem.c @@ -999,7 +999,10 @@ drm_intel_gem_bo_pin(drm_intel_bo *bo, uint32_t alignment) pin.handle = bo_gem->gem_handle; pin.alignment = alignment; - ret = ioctl(bufmgr_gem->fd, DRM_IOCTL_I915_GEM_PIN, &pin); + do { + ret = ioctl(bufmgr_gem->fd, DRM_IOCTL_I915_GEM_PIN, &pin); + } while (ret == -1 && errno == EINTR); + if (ret != 0) return -errno; -- cgit v1.2.3