Use acquire write to cr_lock to complement with release write at end
of locked region. Submitted by: kib
This commit is contained in:
parent
90458813cd
commit
5040da77c1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=309751
@ -144,7 +144,7 @@ counter_ratecheck(struct counter_rate *cr, int64_t limit)
|
||||
* First try unlocked read, and then proceed with atomic.
|
||||
*/
|
||||
if ((cr->cr_lock == 0) &&
|
||||
atomic_cmpset_int(&cr->cr_lock, 0, 1)) {
|
||||
atomic_cmpset_acq_int(&cr->cr_lock, 0, 1)) {
|
||||
/*
|
||||
* Check if other thread has just went through the
|
||||
* reset sequence before us.
|
||||
|
Loading…
Reference in New Issue
Block a user