History log of /frameworks/base/include/utils/Looper.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a97e50f20d39d2abf0fab77090dd82bdef4bce7a 08-Oct-2010 Jeff Brown <jeffbrown@google.com> Revert to using epoll_wait().

This change depends on the kernel having been patched to use hrtimers
instead of jiffies for scheduling epoll timeouts.

Change-Id: I216bc1c4f565e67ebcb3d2ba4280cb615932bb9e
/frameworks/base/include/utils/Looper.h
415d8c38199e258dfce92cdb0c69e056b3b51ef8 06-Oct-2010 Jeff Brown <jeffbrown@google.com> Switch Looper back to using poll() instead of epoll().

Added a couple of micro-optimizations to avoid calling wake() unnecessarily
and reduce JNI overhead slightly.

Fixed a minor issue where we were not clearing the "next" field of Messages
returned by the MessageQueue so the Message would hold on to its successor
and potentially prevent the GC from collecting it if the message were leaked
somehow.

Change-Id: I488d29417ce0cdd7d0e447cda76ec978ef7f811c
/frameworks/base/include/utils/Looper.h
134b4ae90103a7b205cd84d0491a4868cb102a7c 22-Sep-2010 Jeff Brown <jeffbrown@google.com> Looper: use pthread_once for TLS key initialization.

Also fix a Valgrind complaint by zeroing out the entire epoll event
struct since otherwise the data field union would be partly
uninitialized (but not in a harmful way).

Change-Id: I2091ce517e87fcad7c9caf90e2c5e4854a7ca465
/frameworks/base/include/utils/Looper.h
a1361e48fa5ac353b70f90eef8c1ca63f66ded19 17-Sep-2010 Jeff Brown <jeffbrown@google.com> Looper: Drop default parameters in favor of a safer overload.

The idea is that if you're writing code that wants fd/events/data on
return from pollOnce() / pollAll() you should really pass in all of those
arguments. When I changed the Looper API earlier, it was difficult
to ensure that all callers were passing the right parameters since they
were relying on default parameters to some degree so usage mistakes
would not have been caught by the compiler.

Change-Id: I1f2812894270aaf1515017ac1616b6b312d9b565
/frameworks/base/include/utils/Looper.h
4fe6c3e51be77e35f40872cdbca6c80f8f8b7ecb 14-Sep-2010 Jeff Brown <jeffbrown@google.com> Replace epoll() with poll() and rename PollLoop to Looper.

As part of this change, consolidated and cleaned up the Looper API so
that there are fewer distinctions between the NDK and non-NDK declarations
(no need for two callback types, etc.).

Removed the dependence on specific constants from sys/poll.h such as
POLLIN. Instead looper.h defines events like LOOPER_EVENT_INPUT for
the events that it supports. That should help make any future
under-the-hood implementation changes easier.

Fixed a couple of compiler warnings along the way.

Change-Id: I449a7ec780bf061bdd325452f823673e2b39b6ae
/frameworks/base/include/utils/Looper.h