Module Name: src Committed By: riastradh Date: Sun Dec 19 12:45:50 UTC 2021
Modified Files: src/sys/external/bsd/drm2/include/linux: sched.h Log Message: linux: Define need_resched as alias for preempt_needed. No need to open-code this (nor to do it slightly wrong). To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 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.21 src/sys/external/bsd/drm2/include/linux/sched.h:1.22 --- src/sys/external/bsd/drm2/include/linux/sched.h:1.21 Sun Dec 19 12:35:54 2021 +++ src/sys/external/bsd/drm2/include/linux/sched.h Sun Dec 19 12:45:50 2021 @@ -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 @@ schedule_timeout_uninterruptible(long ti 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