Module Name:    src
Committed By:   martin
Date:           Thu Oct 30 09:20:47 UTC 2014

Modified Files:
        src/sys/external/bsd/drm2/include/linux [netbsd-7]: sched.h

Log Message:
Pull up following revision(s) (requested by nonaka in ticket #161):
        sys/external/bsd/drm2/include/linux/sched.h: revision 1.4
Don't call kpause(9) if cold.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.3.2.1 src/sys/external/bsd/drm2/include/linux/sched.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/linux/sched.h
diff -u src/sys/external/bsd/drm2/include/linux/sched.h:1.3 src/sys/external/bsd/drm2/include/linux/sched.h:1.3.2.1
--- src/sys/external/bsd/drm2/include/linux/sched.h:1.3	Wed Jul 16 20:56:25 2014
+++ src/sys/external/bsd/drm2/include/linux/sched.h	Thu Oct 30 09:20:47 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: sched.h,v 1.3 2014/07/16 20:56:25 riastradh Exp $	*/
+/*	$NetBSD: sched.h,v 1.3.2.1 2014/10/30 09:20:47 martin Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -51,12 +51,17 @@ schedule_timeout_uninterruptible(long ti
 {
 	int start, end;
 
+	if (cold) {
+		DELAY(timeout);
+		return 0;
+	}
+
 	start = hardclock_ticks;
 	/* XXX Integer truncation...not likely to matter here.  */
 	(void)kpause("loonix", false /*!intr*/, timeout, NULL);
 	end = hardclock_ticks;
 
-	return (end - start);
+	return (end - start) > 0 ? (end - start) : 0;
 }
 
 #endif  /* _LINUX_SCHED_H_ */

Reply via email to