diff options
author | Roland Scheidegger <rscheidegger@gmx.ch> | 2006-03-05 02:14:56 +0000 |
---|---|---|
committer | Roland Scheidegger <rscheidegger@gmx.ch> | 2006-03-05 02:14:56 +0000 |
commit | d9f80ee0fcbd25e27fd9939bf7da0511e474f110 (patch) | |
tree | 21a33a8f7a99135f9da7bdceee5c040dbea533f7 | |
parent | e66861e4db6accbc28e2473c6f9f4d855fb160ec (diff) |
Attempt to fix the issue reported by Alan Grimes with DRM_RADEON_TEXTURE
erroring out when it shouldn't. The errno could be changed by usleep() between
the ioctl call and the loop check, if a signal was received. This could cause
an EAGAIN return from the DRM_RADEON_TEXTURE ioctl to not loop again.
Instead of checking errno, check thevalue of ret itself, since it is a saved
(and sign-flipped) copy of errno from the ioctl call.
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_texmem.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_texmem.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_texmem.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_texmem.c b/src/mesa/drivers/dri/r200/r200_texmem.c index 7472afeedd..14ee8238ad 100644 --- a/src/mesa/drivers/dri/r200/r200_texmem.c +++ b/src/mesa/drivers/dri/r200/r200_texmem.c @@ -427,7 +427,7 @@ static void uploadSubImage( r200ContextPtr rmesa, r200TexObjPtr t, fprintf(stderr, "DRM_RADEON_TEXTURE: again!\n"); usleep(1); } - } while ( ret && errno == EAGAIN ); + } while ( ret == -EAGAIN ); UNLOCK_HARDWARE( rmesa ); diff --git a/src/mesa/drivers/dri/r300/r300_texmem.c b/src/mesa/drivers/dri/r300/r300_texmem.c index 5c70e2e3c5..ca392762ad 100644 --- a/src/mesa/drivers/dri/r300/r300_texmem.c +++ b/src/mesa/drivers/dri/r300/r300_texmem.c @@ -417,7 +417,7 @@ static void uploadSubImage(r300ContextPtr rmesa, r300TexObjPtr t, "DRM_RADEON_TEXTURE: again!\n"); usleep(1); } - } while (ret && errno == EAGAIN); + } while (ret == -EAGAIN); UNLOCK_HARDWARE(&rmesa->radeon); diff --git a/src/mesa/drivers/dri/radeon/radeon_texmem.c b/src/mesa/drivers/dri/radeon/radeon_texmem.c index d492e190c1..3943afcde0 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texmem.c +++ b/src/mesa/drivers/dri/radeon/radeon_texmem.c @@ -304,7 +304,7 @@ static void uploadSubImage( radeonContextPtr rmesa, radeonTexObjPtr t, do { ret = drmCommandWriteRead( rmesa->dri.fd, DRM_RADEON_TEXTURE, &tex, sizeof(drm_radeon_texture_t) ); - } while ( ret && errno == EAGAIN ); + } while ( ret == -EAGAIN ); UNLOCK_HARDWARE( rmesa ); |