Fix race condition in timer disarm/delete.
When setting a repeat timer using the SIGEV_THREAD mechanism, it's possible that the callback can be called after the timer is disarmed or deleted. This happens because the kernel can generate signals that the timer thread will continue to handle even after the timer is supposed to be off. Add two new tests to verify that disarming/deleting doesn't continue to call the callback. Modify the repeat test to finish more quickly than before. Refactor the Counter implementation a bit. Bug: 18039727 (cherry pick from commit 0724132c) Change-Id: I135726ea4038a47920a6c511708813b1a9996c42
Loading
Please sign in to comment