To ensure that the rw-lock continues to work as expected add a test which spins up a large number of threads and then has them content on a single lock and has those threads record if another thread is also active in the same critical region. Each thread then sleeps (while in critical region) and then releases. This repeats for up to 5 seconds and then finishes; at that point there should have been no simultaneous access (if there was this would indicate the rw-lock is broken). Change-Id: Ia293dda989ad924be3daca01eb79ca04bf60c79b
20 KiB
20 KiB