diff options
author | 2020-09-25 14:42:39 +0000 | |
---|---|---|
committer | 2020-09-25 14:42:39 +0000 | |
commit | b10b8bb2d74b11857dd85dd588edbdb725ef652a (patch) | |
tree | 05a9e9aa2fc8231ea30fd8cf2b2c00f1e5a79fe2 | |
parent | landisk has legacy global variable want_resched, rather than post-MP (diff) | |
download | wireguard-openbsd-b10b8bb2d74b11857dd85dd588edbdb725ef652a.tar.xz wireguard-openbsd-b10b8bb2d74b11857dd85dd588edbdb725ef652a.zip |
landisk has legacy global variable want_resched, rather than post-MP
ci->ci_want_resched. convert to the modern style.
-rw-r--r-- | sys/arch/sh/include/cpu.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/sys/arch/sh/include/cpu.h b/sys/arch/sh/include/cpu.h index 04384bbe847..0d9e5ea0bfa 100644 --- a/sys/arch/sh/include/cpu.h +++ b/sys/arch/sh/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.29 2020/05/31 06:23:58 dlg Exp $ */ +/* $OpenBSD: cpu.h,v 1.30 2020/09/25 14:42:39 deraadt Exp $ */ /* $NetBSD: cpu.h,v 1.41 2006/01/21 04:24:12 uwe Exp $ */ /*- @@ -68,6 +68,8 @@ struct cpu_info { #ifdef GPROF struct gmonparam *ci_gmon; #endif + + int ci_want_resched; }; extern struct cpu_info cpu_info_store; @@ -109,13 +111,8 @@ struct clockframe { * Preempt the current process if in interrupt from user mode, * or after the current trap/syscall if in system mode. */ -#define need_resched(ci) \ -do { \ - want_resched = 1; \ - if (curproc != NULL) \ - aston(curproc); \ -} while (/*CONSTCOND*/0) -#define clear_resched(ci) want_resched = 0 +void need_resched(struct cpu_info *); +#define clear_resched(ci) (ci)->ci_want_resched = 0 /* * Give a profiling tick to the current process when the user profiling @@ -132,8 +129,6 @@ do { \ #define aston(p) ((p)->p_md.md_astpending = 1) -extern int want_resched; /* need_resched() was called */ - /* * We need a machine-independent name for this. */ |