Module Name:    src
Committed By:   nonaka
Date:           Sat Nov  8 19:27:40 UTC 2014

Modified Files:
        src/sys/external/bsd/drm2/include/linux: sched.h

Log Message:
return correct remaining jiffies.
fix X server hang when screen blank by DPMS.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 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.4 src/sys/external/bsd/drm2/include/linux/sched.h:1.5
--- src/sys/external/bsd/drm2/include/linux/sched.h:1.4	Wed Oct 22 11:41:34 2014
+++ src/sys/external/bsd/drm2/include/linux/sched.h	Sat Nov  8 19:27:40 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: sched.h,v 1.4 2014/10/22 11:41:34 nonaka Exp $	*/
+/*	$NetBSD: sched.h,v 1.5 2014/11/08 19:27:40 nonaka Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -49,6 +49,7 @@ task_pid_nr(struct proc *p)
 static inline long
 schedule_timeout_uninterruptible(long timeout)
 {
+	long remain;
 	int start, end;
 
 	if (cold) {
@@ -61,7 +62,8 @@ schedule_timeout_uninterruptible(long ti
 	(void)kpause("loonix", false /*!intr*/, timeout, NULL);
 	end = hardclock_ticks;
 
-	return (end - start) > 0 ? (end - start) : 0;
+	remain = timeout - (end - start);
+	return remain > 0 ? remain : 0;
 }
 
 #endif  /* _LINUX_SCHED_H_ */

Reply via email to