summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2003-07-07 09:30:47 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2003-07-07 09:30:47 +0000
commitd208d0b561473651b5296558f09eb7d4bcd269b6 (patch)
treefe7b7bd1469398755a4d6eca8c3db3dd1538a9b6
parentba3f0517c73f8c04f1e3ea56e25bc286081aeb36 (diff)
Use braces around condition in DRM_WAIT_ON. Match linux version's semantics
more closely.
-rw-r--r--bsd-core/drm_os_freebsd.h4
-rw-r--r--bsd/drm_os_freebsd.h4
2 files changed, 2 insertions, 6 deletions
diff --git a/bsd-core/drm_os_freebsd.h b/bsd-core/drm_os_freebsd.h
index 2524523a..c1ed0f70 100644
--- a/bsd-core/drm_os_freebsd.h
+++ b/bsd-core/drm_os_freebsd.h
@@ -175,10 +175,8 @@ do { \
#define DRM_HZ hz
#define DRM_WAIT_ON( ret, queue, timeout, condition ) \
-while (!condition) { \
+for ( ret = 0 ; !(condition) && !ret ; ) { \
ret = tsleep( &(queue), PZERO | PCATCH, "drmwtq", (timeout) ); \
- if ( ret ) \
- return ret; \
}
#define DRM_WAKEUP( queue ) wakeup( queue )
diff --git a/bsd/drm_os_freebsd.h b/bsd/drm_os_freebsd.h
index 2524523a..c1ed0f70 100644
--- a/bsd/drm_os_freebsd.h
+++ b/bsd/drm_os_freebsd.h
@@ -175,10 +175,8 @@ do { \
#define DRM_HZ hz
#define DRM_WAIT_ON( ret, queue, timeout, condition ) \
-while (!condition) { \
+for ( ret = 0 ; !(condition) && !ret ; ) { \
ret = tsleep( &(queue), PZERO | PCATCH, "drmwtq", (timeout) ); \
- if ( ret ) \
- return ret; \
}
#define DRM_WAKEUP( queue ) wakeup( queue )