Skip to content

Fixed locking bug on linux

Benjamin Winger requested to merge bmwinger/portmod:lock_fixes into master

The underlying lock mechanism on linux does not support upgrading locks from read to write, or vice-versa, and this sometimes causes bugs. The custom re-entrant and upgradeable lock code worked for acquiring the write lock when the read lock was already acquired, but not vice-versa (which is unnecessary, as write access is exclusive, so reading is always safe).

Also noticed a couple of other minor issues with the lock handling code.

Merge request reports