managarm / libasync

Async primitives library for C++20
https://docs.managarm.org/libasync/
MIT License
17 stars 5 forks source link

mutex: Fix several bugs in shared_mutex #14

Closed Dennisbonke closed 2 years ago

Dennisbonke commented 2 years ago

While debugging chromium, we came across two bugs in libasync, causing a system crash (missing !waiters_.empty() check) and a system hang (shared_cnt_ being initialized to 1). Please do check this very carefully to see if it is correct, tho I did not notice regressions.