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 #15

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 (sharedcnt being initialized to 1). Please do check this very carefully to see if it is correct, tho I did not notice regressions.

Dennisbonke commented 2 years ago

@avdgrinten Fixed the nitpick as requested, should be good to go.