Lines Matching full:events
53 int SimpleLooperCallback::handleEvent(int fd, int events, void* data) {
54 return mCallback(fd, events, data);
63 // Maximum number of file descriptors for which to retrieve poll events each iteration.
95 eventItem.events = EPOLLIN;
167 int events = response.events;
171 "fd=%d, events=0x%x, data=%p",
172 this, ident, fd, events, data);
175 if (outEvents != NULL) *outEvents = events;
250 // Handle all events.
252 ALOGD("%p ~ pollOnce - handling events from %d fds", this, eventCount);
257 uint32_t epollEvents = eventItems[i].events;
262 ALOGW("Ignoring unexpected epoll events 0x%x on wake read pipe.", epollEvents);
267 int events = 0;
268 if (epollEvents & EPOLLIN) events |= ALOOPER_EVENT_INPUT;
269 if (epollEvents & EPOLLOUT) events |= ALOOPER_EVENT_OUTPUT;
270 if (epollEvents & EPOLLERR) events |= ALOOPER_EVENT_ERROR;
271 if (epollEvents & EPOLLHUP) events |= ALOOPER_EVENT_HANGUP;
272 pushResponse(events, mRequests.valueAt(requestIndex));
274 ALOGW("Ignoring unexpected epoll events 0x%x on fd %d that is "
323 int events = response.events;
326 ALOGD("%p ~ pollOnce - invoking fd event callback %p: fd=%d, events=0x%x, data=%p",
327 this, response.request.callback.get(), fd, events, data);
329 int callbackResult = response.request.callback->handleEvent(fd, events, data);
397 void Looper::pushResponse(int events, const Request& request) {
399 response.events = events;
404 int Looper::addFd(int fd, int ident, int events, ALooper_callbackFunc callback, void* data) {
405 return addFd(fd, ident, events, callback ? new SimpleLooperCallback(callback) : NULL, data);
408 int Looper::addFd(int fd, int ident, int events, const sp<LooperCallback>& callback, void* data) {
410 ALOGD("%p ~ addFd - fd=%d, ident=%d, events=0x%x, callback=%p, data=%p", this, fd, ident,
411 events, callback.get(), data);
429 if (events & ALOOPER_EVENT_INPUT) epollEvents |= EPOLLIN;
430 if (events & ALOOPER_EVENT_OUTPUT) epollEvents |= EPOLLOUT;
443 eventItem.events = epollEvents;
450 ALOGE("Error adding epoll events for fd %d, errno=%d", fd, errno);
457 ALOGE("Error modifying epoll events for fd %d, errno=%d", fd, errno);
480 ALOGE("Error removing epoll events for fd %d, errno=%d", fd, errno);