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.
This commit is contained in:
John Baldwin 2008-08-22 16:14:23 +00:00
parent 4b3963629c
commit 814f26da8a

View File

@ -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);
/*