SVNews r330415

NOTE: This service is experimental and subject to change! Use at your own risk!

2018-03-04 21:41:05 - r330415 by mjg (Mateusz Guzik)

Complete list of files affected by revision r330415:

(Note: At the moment, these links point to ViewVC on They are probably slow. Do not overuse.)

  History   Contents   Diff   MODIFY   /head/sys/kern/kern_sx.c  

Commit message:

sx: don't do an atomic op in upgrade if it cananot succeed

The code already pays the cost of reading the lock to obtain the waiters
flag. Checking whether there is more than one reader is not a problem and
avoids dirtying the line.

This also fixes a small corner case: if waiters were to show up between
reading the flag and upgrading the lock, the operation would fail even
though it should not. No correctness change here though.


Powered by Python FreeBSD support by secnetix GmbH & Co. KG

Page generated in 5 ms, 1 file printed. Current time is 2018-03-22 11:46:59. All times are in UTC/GMT.