OSDN Git Service

Fix deadlock in timer_delete.
authorChristopher Ferris <cferris@google.com>
Fri, 21 Mar 2014 03:47:45 +0000 (20:47 -0700)
committerChristopher Ferris <cferris@google.com>
Fri, 21 Mar 2014 03:47:45 +0000 (20:47 -0700)
commit753ad778bc1c3aecc4cd82b8387a7dc8a9b44d34
tree6eedabf25b6c892f6eb95b847e3100c8245dcacf
parent2cc58603d5fd68ec582984318fb3c5f8865a186f
Fix deadlock in timer_delete.

If the callback function for a timer did a timer_delete, the function
would never return. The problem was that the timer_delete function would try
to wait until the timer thread has finished. Waiting for yourself to finish
doesn't work very well.

Bug: 13397340
Change-Id: Ica123a5bafbc8660c8a4a909e5c2dead55ca429d
libc/bionic/posix_timers.cpp
tests/time_test.cpp