summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_lock.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2008-08-22 16:14:23 +0000
committerjhb <jhb@FreeBSD.org>2008-08-22 16:14:23 +0000
commitb908d9aa367ede3b21ad7edcde2200b3248e6ab6 (patch)
tree7eaa93ca722924e9de69eb755ae819408ee9b039 /sys/kern/kern_lock.c
parentb68109381ea88e917112b6828f71a8e504379684 (diff)
downloadFreeBSD-src-b908d9aa367ede3b21ad7edcde2200b3248e6ab6.zip
FreeBSD-src-b908d9aa367ede3b21ad7edcde2200b3248e6ab6.tar.gz
Use |= rather than += when aggregrating requests to wakeup the swapper.
What we really want is an inclusive or of all the requests, and += can in theory roll over to 0.
Diffstat (limited to 'sys/kern/kern_lock.c')
-rw-r--r--sys/kern/kern_lock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c
index 2f71efa..df123a5 100644
--- a/sys/kern/kern_lock.c
+++ b/sys/kern/kern_lock.c
@@ -499,7 +499,7 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lock_object *ilk,
* We have been unable to succeed in upgrading, so just
* give up the shared lock.
*/
- wakeup_swapper += wakeupshlk(lk, file, line);
+ wakeup_swapper |= wakeupshlk(lk, file, line);
/* FALLTHROUGH */
case LK_EXCLUSIVE:
@@ -787,7 +787,7 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lock_object *ilk,
"%s: %p waking up all threads on the %s queue",
__func__, lk, queue == SQ_SHARED_QUEUE ?
"shared" : "exclusive");
- wakeup_swapper += sleepq_broadcast(
+ wakeup_swapper |= sleepq_broadcast(
&lk->lock_object, SLEEPQ_LK, 0, queue);
/*
OpenPOWER on IntegriCloud