On 9/7/21 2:08 PM, Guillaume Charifi wrote:
@@ -2839,7 +2841,51 @@ static int poll_single_socket( struct sock *sock, int mask ) return get_poll_flags( sock, pollfd.revents ) & mask; }
-static void poll_socket( struct sock *poll_sock, struct async *async, timeout_t timeout, +static struct poll_req *get_main_poll(struct sock *sock) +{
- struct poll_req *req;
- LIST_FOR_EACH_ENTRY(req, &poll_list, struct poll_req, entry)
- {
unsigned int i;
for (i = 0; i < req->count; ++i)
{
if (req->sockets[i].sock == sock
&& req->sockets[i].main)
return req;
}
- }
- return NULL;
+}
We have the cancel_async() callback upstream now, so this can be replaced, as discussed :-)