diff options
| author | 2007-03-15 10:22:29 +0000 | |
|---|---|---|
| committer | 2007-03-15 10:22:29 +0000 | |
| commit | 29514732ed7d204db854b589692b0fd90dc452d0 (patch) | |
| tree | 5e8143a1e45a8ca7a90bc7199927c179bed99d96 /sys/kern/init_main.c | |
| parent | regen (diff) | |
| download | wireguard-openbsd-29514732ed7d204db854b589692b0fd90dc452d0.tar.xz wireguard-openbsd-29514732ed7d204db854b589692b0fd90dc452d0.zip | |
Since p_flag is often manipulated in interrupts and without biglock
it's a good idea to use atomic.h operations on it. This mechanic
change updates all bit operations on p_flag to atomic_{set,clear}bits_int.
Only exception is that P_OWEUPC is set by MI code before calling
need_proftick and it's automatically cleared by ADDUPC. There's
no reason for MD handling of that flag since everyone handles it the
same way.
kettenis@ ok
Diffstat (limited to 'sys/kern/init_main.c')
| -rw-r--r-- | sys/kern/init_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 2d90604ff43..f54f517f4f8 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_main.c,v 1.134 2007/01/12 07:41:31 art Exp $ */ +/* $OpenBSD: init_main.c,v 1.135 2007/03/15 10:22:30 art Exp $ */ /* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */ /* @@ -270,7 +270,7 @@ main(void *framep) p->p_thrparent = p; LIST_INIT(&p->p_thrchildren); - p->p_flag = P_SYSTEM | P_NOCLDWAIT; + atomic_setbits_int(&p->p_flag, P_SYSTEM | P_NOCLDWAIT); p->p_stat = SONPROC; p->p_nice = NZERO; p->p_emul = &emul_native; |
