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 linux: Define need_resch...



details:   https://anonhg.NetBSD.org/src/rev/44b9b1712199
branches:  trunk
changeset: 1029033:44b9b1712199
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 12:45:50 2021 +0000

description:
linux: Define need_resched as alias for preempt_needed.

No need to open-code this (nor to do it slightly wrong).

diffstat:

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

diffs (21 lines):

diff -r fb7d77453d8e -r 44b9b1712199 sys/external/bsd/drm2/include/linux/sched.h
--- a/sys/external/bsd/drm2/include/linux/sched.h       Sun Dec 19 12:45:43 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/sched.h       Sun Dec 19 12:45:50 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sched.h,v 1.21 2021/12/19 12:35:54 riastradh Exp $     */
+/*     $NetBSD: sched.h,v 1.22 2021/12/19 12:45:50 riastradh Exp $     */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -97,9 +97,8 @@
 static inline bool
 need_resched(void)
 {
-       /* XXX kpreempt_disable */
-       /* XXX ci_want_resched */
-       return (curcpu()->ci_schedstate.spc_flags & SPCF_SHOULDYIELD);
+
+       return preempt_needed();
 }
 
 static inline void



Home | Main Index | Thread Index | Old Index