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/tty_tty.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/tty_tty.c')
| -rw-r--r-- | sys/kern/tty_tty.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/tty_tty.c b/sys/kern/tty_tty.c index 8723c197c41..e2a4b4accbb 100644 --- a/sys/kern/tty_tty.c +++ b/sys/kern/tty_tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty_tty.c,v 1.9 2005/12/21 12:43:49 jsg Exp $ */ +/* $OpenBSD: tty_tty.c,v 1.10 2007/03/15 10:22:30 art Exp $ */ /* $NetBSD: tty_tty.c,v 1.13 1996/03/30 22:24:46 christos Exp $ */ /*- @@ -119,7 +119,7 @@ cttyioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) return (EINVAL); if (cmd == TIOCNOTTY) { if (!SESS_LEADER(p)) { - p->p_flag &= ~P_CONTROLT; + atomic_clearbits_int(&p->p_flag, P_CONTROLT); return (0); } else return (EINVAL); |
