diff options
author | Eric Anholt <anholt@freebsd.org> | 2002-09-29 22:39:34 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2002-09-29 22:39:34 +0000 |
commit | 33a51d8518c37833a83225b47ad0b435050edeae (patch) | |
tree | 69e381e6d74b458f3647944ad76672fcf75b85d7 | |
parent | 899df4f53009d8484648ca12133a6ef8b1bd2d52 (diff) |
Fix some of my silliness in DRM_WAIT_ON (not returning EINTR).
-rw-r--r-- | bsd-core/drm_os_freebsd.h | 12 | ||||
-rw-r--r-- | bsd/drm_os_freebsd.h | 12 |
2 files changed, 10 insertions, 14 deletions
diff --git a/bsd-core/drm_os_freebsd.h b/bsd-core/drm_os_freebsd.h index a0ec9e3c..2fa19cee 100644 --- a/bsd-core/drm_os_freebsd.h +++ b/bsd-core/drm_os_freebsd.h @@ -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 ) diff --git a/bsd/drm_os_freebsd.h b/bsd/drm_os_freebsd.h index a0ec9e3c..2fa19cee 100644 --- a/bsd/drm_os_freebsd.h +++ b/bsd/drm_os_freebsd.h @@ -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 ) |