Lines Matching defs:pollfd
110 struct fdarray pollfd;
1112 fdarray__init(&thread_data->pollfd, 64);
1119 for (f = 0; f < evlist->core.pollfd.nr; f++) {
1120 void *ptr = evlist->core.pollfd.priv[f].ptr;
1123 pos = fdarray__dup_entry_from(&thread_data->pollfd, f,
1124 &evlist->core.pollfd);
1127 pr_debug2("thread_data[%p]: pollfd[%d] <- event_fd=%d\n",
1128 thread_data, pos, evlist->core.pollfd.entries[f].fd);
1148 fdarray__exit(&thread_data[t].pollfd);
1172 struct pollfd *e_entries = evlist->core.pollfd.entries;
1173 struct pollfd *t_entries = thread_data->pollfd.entries;
1183 pr_err("Thread and evlist pollfd index mismatch\n");
1196 struct fdarray *fda = &evlist->core.pollfd;
1202 ret = fdarray__dup_entry_from(&thread_data->pollfd, i, fda);
1204 pr_err("Failed to duplicate descriptor in main thread pollfd\n");
1207 pr_debug2("thread_data[%p]: pollfd[%d] <- non_perf_event fd=%d\n",
1211 pr_err("Failed to map thread and evlist pollfd indexes\n");
1243 pr_err("Failed to initialize thread[%d] pollfd\n", t);
1253 ret = fdarray__add(&thread_data[t].pollfd, thread_data[t].pipes.msg[0],
1256 pr_err("Failed to add descriptor to thread[%d] pollfd\n", t);
1260 pr_debug2("thread_data[%p]: pollfd[%d] <- ctl_fd=%d\n",
1743 struct fdarray *pollfd;
1755 pollfd = &thread->pollfd;
1766 err = fdarray__poll(pollfd, -1);
1775 if (fdarray__filter(pollfd, POLLERR | POLLHUP,
1780 if (pollfd->entries[ctlfd_pos].revents & POLLHUP) {
1784 pollfd->entries[ctlfd_pos].fd = -1;
1785 pollfd->entries[ctlfd_pos].events = 0;
1788 pollfd->entries[ctlfd_pos].revents = 0;
2801 err = fdarray__poll(&thread->pollfd, -1);
2810 if (fdarray__filter(&thread->pollfd, POLLERR | POLLHUP,