Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/include/linux Expand some <linux/sched...



details:   https://anonhg.NetBSD.org/src/rev/41d6d8c9d8f9
branches:  trunk
changeset: 1027966:41d6d8c9d8f9
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 01:22:44 2021 +0000

description:
Expand some <linux/sched.h> definitions.

diffstat:

 sys/external/bsd/drm2/include/linux/sched.h |  13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diffs (41 lines):

diff -r ac23d01f6641 -r 41d6d8c9d8f9 sys/external/bsd/drm2/include/linux/sched.h
--- a/sys/external/bsd/drm2/include/linux/sched.h       Sun Dec 19 01:22:37 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/sched.h       Sun Dec 19 01:22:44 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sched.h,v 1.15 2020/07/03 16:23:02 maxv Exp $  */
+/*     $NetBSD: sched.h,v 1.16 2021/12/19 01:22:44 riastradh Exp $     */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -33,6 +33,7 @@
 #define _LINUX_SCHED_H_
 
 #include <sys/param.h>
+#include <sys/cdefs.h>
 #include <sys/kernel.h>
 #include <sys/proc.h>
 
@@ -45,6 +46,8 @@
 
 #define        MAX_SCHEDULE_TIMEOUT    (INT_MAX/2)     /* paranoia */
 
+#define        TASK_UNINTERRUPTIBLE    __BIT(0)
+
 #define        current curproc
 
 static inline pid_t
@@ -83,6 +86,14 @@
        return remain > 0 ? remain : 0;
 }
 
+static inline bool
+need_resched(void)
+{
+       /* XXX kpreempt_disable */
+       /* XXX ci_want_resched */
+       return (curcpu()->ci_schedstate.spc_flags & SPCF_SHOULDYIELD);
+}
+
 static inline void
 cond_resched(void)
 {



Home | Main Index | Thread Index | Old Index