OSDN Git Service

Change on handling of SIGEV_THREAD timers.
authorYabin Cui <yabinc@google.com>
Wed, 14 Jan 2015 03:53:15 +0000 (19:53 -0800)
committerYabin Cui <yabinc@google.com>
Thu, 16 Apr 2015 00:36:01 +0000 (17:36 -0700)
commit95f1ee235ae257802a94d7e94d476ea0aaea5cd8
treecf163cac0ade7c84c7c07bbffcd8f5e07201a0d4
parent447cd19681cfd0a71282c87d1b32a7757bbaba81
Change on handling of SIGEV_THREAD timers.

1. Don't prevent calling callback when SIGEV_THREAD timers are disarmed by timer_settime.
As in POSIX standard: The effect of disarming or resetting a timer with pending
expiration notifications is unspecified. And glibc didn't prevent in this situation, so I
think it is fine to remove the support.
2. Still prevent calling callback when SIGEV_THREAD timers are deleted by timer_delete.
As in POSIX standard: The disposition of pending signals for the deleted timer is unspecified.
However, glibc handles this (although that is not perfect). And some of our tests in
time_test.cpp depend on this feature as described in b/18039727. so I retain the support.
3. Fix some flaky test in time_test.cpp, and make "time*" test pass on bionic-unit-tests-glibcxx.

Bug: 18263854

Change-Id: I8ced184eacdbfcf433fd81b0c69c38824beb8ebc
libc/bionic/posix_timers.cpp
tests/time_test.cpp