fix racy assert in SharedMutex
Summary: SharedMutex purposely allows the inline reader count to underflow in some situations while preserving proper locking behavior (the inline reader count is only trusted if all deferred locks have been applied), but there was an additional way that this could occur that wasn't documented or allowed by the asserts. The effect was a false positive assert in rare conditions or the possibility of losing track of a deferred lock slot. This diff fixes both the over-aggressive assert and the potential loss of the shared slot. If the assert didn't fire for you then this diff won't change the correctness of your program. Reviewed By: @yfeldblum Differential Revision: D2269018
Showing
Please register or sign in to comment