Module Name:    src
Committed By:   riastradh
Date:           Sun Sep  8 16:35:20 UTC 2013

Modified Files:
        src/sys/external/bsd/drm2/include/drm [riastradh-drm2]:
            drm_wait_netbsd.h

Log Message:
Fix DRM_WAIT_UNTIL to initialize (RET) on every exit.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.7 -r1.1.2.8 \
    src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h
diff -u src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h:1.1.2.7 src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h:1.1.2.8
--- src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h:1.1.2.7	Sun Sep  8 16:02:50 2013
+++ src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h	Sun Sep  8 16:35:20 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_wait_netbsd.h,v 1.1.2.7 2013/09/08 16:02:50 riastradh Exp $	*/
+/*	$NetBSD: drm_wait_netbsd.h,v 1.1.2.8 2013/09/08 16:35:20 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -102,7 +102,11 @@ DRM_SPIN_WAKEUP_ALL(drm_waitqueue_t *q, 
 #define	DRM_WAIT_UNTIL(RET, Q, INTERLOCK, CONDITION)	do		\
 {									\
 	KASSERT(mutex_is_locked((INTERLOCK)));				\
-	while (!(CONDITION)) {						\
+	for (;;) {							\
+		if (CONDITION) {					\
+			(RET) = 0;					\
+			break;						\
+		}							\
 		/* XXX errno NetBSD->Linux */				\
 		(RET) = -cv_wait_sig((Q), &(INTERLOCK)->mtx_lock);	\
 		if (RET)						\

Reply via email to