diff options
author | kettenis <kettenis@openbsd.org> | 2010-01-09 02:44:17 +0000 |
---|---|---|
committer | kettenis <kettenis@openbsd.org> | 2010-01-09 02:44:17 +0000 |
commit | 08c2c4470b2558b944845574f3dc91187513e014 (patch) | |
tree | 3a5f5ce97c3a42c52d8360278ee13da514685135 /sys/sys/sched.h | |
parent | Remove typo and magic numbers from #if 0'd block, from Brad. (diff) | |
download | wireguard-openbsd-08c2c4470b2558b944845574f3dc91187513e014.tar.xz wireguard-openbsd-08c2c4470b2558b944845574f3dc91187513e014.zip |
Add code to stop scheduling processes on CPUs, effectively halting that CPU.
Use this to do a shutdown with only the boot processor running. This should
avoid nasty races during shutdown.
help from art@, ok deraadt@, miod@
Diffstat (limited to 'sys/sys/sched.h')
-rw-r--r-- | sys/sys/sched.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/sys/sched.h b/sys/sys/sched.h index 5e5d9297bbd..9304a631628 100644 --- a/sys/sys/sched.h +++ b/sys/sys/sched.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sched.h,v 1.24 2009/11/29 23:12:30 kettenis Exp $ */ +/* $OpenBSD: sched.h,v 1.25 2010/01/09 02:44:17 kettenis Exp $ */ /* $NetBSD: sched.h,v 1.2 1999/02/28 18:14:58 ross Exp $ */ /*- @@ -122,6 +122,8 @@ struct schedstate_percpu { #define SPCF_SEENRR 0x0001 /* process has seen roundrobin() */ #define SPCF_SHOULDYIELD 0x0002 /* process should yield the CPU */ #define SPCF_SWITCHCLEAR (SPCF_SEENRR|SPCF_SHOULDYIELD) +#define SPCF_SHOULDHALT 0x0004 /* CPU should be vacated */ +#define SPCF_HALTED 0x0008 /* CPU has been halted */ #define SCHED_PPQ (128 / SCHED_NQS) /* priorities per queue */ #define NICE_WEIGHT 2 /* priorities per nice level */ |