… | |
… | |
51 | idx = pollidxs [fd]; |
51 | idx = pollidxs [fd]; |
52 | |
52 | |
53 | if (idx < 0) /* need to allocate a new pollfd */ |
53 | if (idx < 0) /* need to allocate a new pollfd */ |
54 | { |
54 | { |
55 | pollidxs [fd] = idx = pollcnt++; |
55 | pollidxs [fd] = idx = pollcnt++; |
56 | array_needsize (struct pollfd, polls, pollmax, pollcnt, (void)); |
56 | array_needsize (struct pollfd, polls, pollmax, pollcnt, EMPTY2); |
57 | polls [idx].fd = fd; |
57 | polls [idx].fd = fd; |
58 | } |
58 | } |
59 | |
59 | |
60 | assert (polls [idx].fd == fd); |
60 | assert (polls [idx].fd == fd); |
61 | |
61 | |
… | |
… | |
106 | } |
106 | } |
107 | |
107 | |
108 | static int |
108 | static int |
109 | poll_init (EV_P_ int flags) |
109 | poll_init (EV_P_ int flags) |
110 | { |
110 | { |
111 | method_fudge = 1e-3; /* needed to compensate for select returning early, very conservative */ |
111 | backend_fudge = 1e-3; /* needed to compensate for select returning early, very conservative */ |
112 | method_modify = poll_modify; |
112 | backend_modify = poll_modify; |
113 | method_poll = poll_poll; |
113 | backend_poll = poll_poll; |
114 | |
114 | |
115 | pollidxs = 0; pollidxmax = 0; |
115 | pollidxs = 0; pollidxmax = 0; |
116 | polls = 0; pollmax = 0; pollcnt = 0; |
116 | polls = 0; pollmax = 0; pollcnt = 0; |
117 | |
117 | |
118 | return EVMETHOD_POLL; |
118 | return EVBACKEND_POLL; |
119 | } |
119 | } |
120 | |
120 | |
121 | static void |
121 | static void |
122 | poll_destroy (EV_P) |
122 | poll_destroy (EV_P) |
123 | { |
123 | { |