summaryrefslogtreecommitdiff
path: root/sys/compat/hpux
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2007-03-15 10:22:31 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2007-03-15 10:22:31 +0000
commitbd2b614cddbdb963198fdd15728e067d209f3cf7 (patch)
tree1710a23e5d69760e81f4955e44aac6e49a944b07 /sys/compat/hpux
parentb93b6840228d38589b6e976f3a325539c4fc9ae0 (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/compat/hpux')
-rw-r--r--sys/compat/hpux/hpux_file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/compat/hpux/hpux_file.c b/sys/compat/hpux/hpux_file.c
index 63daf9ed6fc..cad38f912b3 100644
--- a/sys/compat/hpux/hpux_file.c
+++ b/sys/compat/hpux/hpux_file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hpux_file.c,v 1.17 2006/09/25 07:12:57 otto Exp $ */
+/* $OpenBSD: hpux_file.c,v 1.18 2007/03/15 10:22:30 art Exp $ */
/* $NetBSD: hpux_file.c,v 1.5 1997/04/27 21:40:48 thorpej Exp $ */
/*
@@ -282,7 +282,7 @@ hpux_sys_fcntl(p, v, retval)
goto out;
}
- p->p_flag |= P_ADVLOCK;
+ atomic_setbits_int(&p->p_flag, P_ADVLOCK);
error = VOP_ADVLOCK(vp, (caddr_t)p, F_SETLK, &fl, flg);
goto out;
@@ -291,7 +291,7 @@ hpux_sys_fcntl(p, v, retval)
error = EBADF;
goto out;
}
- p->p_flag |= P_ADVLOCK;
+ atomic_setbits_int(&p->p_flag, P_ADVLOCK);
error = VOP_ADVLOCK(vp, (caddr_t)p, F_SETLK, &fl, flg);
goto out;