diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2007-03-15 10:22:31 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2007-03-15 10:22:31 +0000 |
commit | bd2b614cddbdb963198fdd15728e067d209f3cf7 (patch) | |
tree | 1710a23e5d69760e81f4955e44aac6e49a944b07 /sys/arch/mips64 | |
parent | b93b6840228d38589b6e976f3a325539c4fc9ae0 (diff) |
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/arch/mips64')
-rw-r--r-- | sys/arch/mips64/include/cpu.h | 4 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/interrupt.c | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/sys/arch/mips64/include/cpu.h b/sys/arch/mips64/include/cpu.h index def5c9e20c4..d24ef984e32 100644 --- a/sys/arch/mips64/include/cpu.h +++ b/sys/arch/mips64/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.14 2006/12/24 20:30:35 miod Exp $ */ +/* $OpenBSD: cpu.h,v 1.15 2007/03/15 10:22:29 art Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -349,7 +349,7 @@ extern int int_nest_cntr; * buffer pages are invalid. On the PICA, request an ast to send us * through trap, marking the proc as needing a profiling tick. */ -#define need_proftick(p) { (p)->p_flag |= P_OWEUPC; aston(); } +#define need_proftick(p) aston() /* * Notify the current process (p) that it has a signal pending, diff --git a/sys/arch/mips64/mips64/interrupt.c b/sys/arch/mips64/mips64/interrupt.c index 59d1aed120d..0cf196762fa 100644 --- a/sys/arch/mips64/mips64/interrupt.c +++ b/sys/arch/mips64/mips64/interrupt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: interrupt.c,v 1.22 2006/12/24 20:30:35 miod Exp $ */ +/* $OpenBSD: interrupt.c,v 1.23 2007/03/15 10:22:29 art Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -267,7 +267,6 @@ softintr() astpending = 0; if (p->p_flag & P_OWEUPC) { - p->p_flag &= ~P_OWEUPC; ADDUPROF(p); } if (want_resched) |