Fix some of my silliness in DRM_WAIT_ON (not returning EINTR).

main
Eric Anholt 2002-09-29 22:39:34 +00:00
parent 899df4f530
commit 33a51d8518
2 changed files with 10 additions and 14 deletions

View File

@ -142,13 +142,11 @@ do { \
#define DRM_HZ hz
#define DRM_WAIT_ON( ret, queue, timeout, condition ) \
do { \
if (condition) \
break; \
ret = tsleep( &(queue), PZERO | PCATCH, "rdnirq", (timeout) ); \
if ( (ret == EWOULDBLOCK) || (ret == EINTR) ) \
return DRM_ERR(EBUSY); \
} while (1)
while (condition) { \
ret = tsleep( &(queue), PZERO | PCATCH, "drmwtq", (timeout) ); \
if ( ret ) \
return ret; \
}
#define DRM_WAKEUP( queue ) wakeup( queue )
#define DRM_WAKEUP_INT( queue ) wakeup( queue )

View File

@ -142,13 +142,11 @@ do { \
#define DRM_HZ hz
#define DRM_WAIT_ON( ret, queue, timeout, condition ) \
do { \
if (condition) \
break; \
ret = tsleep( &(queue), PZERO | PCATCH, "rdnirq", (timeout) ); \
if ( (ret == EWOULDBLOCK) || (ret == EINTR) ) \
return DRM_ERR(EBUSY); \
} while (1)
while (condition) { \
ret = tsleep( &(queue), PZERO | PCATCH, "drmwtq", (timeout) ); \
if ( ret ) \
return ret; \
}
#define DRM_WAKEUP( queue ) wakeup( queue )
#define DRM_WAKEUP_INT( queue ) wakeup( queue )