Module Name: src
Committed By: riastradh
Date: Sun Dec 19 01:22:44 UTC 2021
Modified Files:
src/sys/external/bsd/drm2/include/linux: sched.h
Log Message:
Expand some <linux/sched.h> definitions.
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 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.15 src/sys/external/bsd/drm2/include/linux/sched.h:1.16
--- src/sys/external/bsd/drm2/include/linux/sched.h:1.15 Fri Jul 3 16:23:02 2020
+++ src/sys/external/bsd/drm2/include/linux/sched.h Sun Dec 19 01:22:44 2021
@@ -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 @@ schedule_timeout_uninterruptible(long ti
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)
{