Christopher Ferris 62d84b1935 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 0724132c3263145f2a667f453a199d313a5b3d9f)

Change-Id: I135726ea4038a47920a6c511708813b1a9996c42
2014-10-22 13:20:39 -07:00
..
2014-10-21 11:22:26 -07:00
2013-12-03 18:42:41 -08:00
2013-12-03 18:42:41 -08:00
2014-10-01 11:09:37 -07:00
2014-09-11 08:45:46 -07:00
2013-02-01 14:51:19 -08:00
2014-08-22 10:23:12 -07:00
2014-04-10 20:44:27 -07:00
2014-02-21 16:27:21 +00:00
2013-02-13 14:40:48 -08:00
2014-06-12 13:16:36 -07:00
2014-01-03 14:49:37 -08:00
2014-09-22 14:41:30 -07:00