From 61d386a93f862005d1eddb45be91c7d5421aca83 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 25 Aug 2005 03:38:07 +0000 Subject: 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. --- src/mesa/drivers/dri/r200/r200_texmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/drivers/dri/r200/r200_texmem.c') 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 ); -- cgit v1.2.3