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 Define cond_resched to p...
details: https://anonhg.NetBSD.org/src/rev/c9cfdb9bddd2
branches: trunk
changeset: 365983:c9cfdb9bddd2
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Aug 27 07:29:09 2018 +0000
description:
Define cond_resched to preempt if SPCF_SHOULDYIELD.
diffstat:
sys/external/bsd/drm2/include/linux/sched.h | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diffs (22 lines):
diff -r 98cc88470561 -r c9cfdb9bddd2 sys/external/bsd/drm2/include/linux/sched.h
--- a/sys/external/bsd/drm2/include/linux/sched.h Mon Aug 27 07:28:57 2018 +0000
+++ b/sys/external/bsd/drm2/include/linux/sched.h Mon Aug 27 07:29:09 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sched.h,v 1.8 2018/08/27 06:19:05 riastradh Exp $ */
+/* $NetBSD: sched.h,v 1.9 2018/08/27 07:29:09 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -71,4 +71,12 @@
return remain > 0 ? remain : 0;
}
+static inline void
+cond_resched(void)
+{
+
+ if (curcpu()->ci_schedstate.spc_flags & SPCF_SHOULDYIELD)
+ preempt();
+}
+
#endif /* _LINUX_SCHED_H_ */
Home |
Main Index |
Thread Index |
Old Index