lib/poll-loop.c
/* Look up the node with same fd or wevent. */
Look up the node with same fd or wevent.
Look up the node with same fd or wevent .
static struct poll_node *
find_poll_node(struct poll_loop *loop, int fd, HANDLE wevent)
{
    struct poll_node *node;
    ovs_assert(!fd != !wevent);
    HMAP_FOR_EACH_WITH_HASH (node, hmap_node,
                             hash_2words(fd, (uint32_t)wevent),
                             &loop->poll_nodes) {
        if ((fd && node->pollfd.fd == fd)
            || (wevent && node->wevent == wevent)) {
            return node;
        }
    }
    return NULL;
}
static struct poll_node * find_poll_node ( struct poll_loop * loop , int fd , HANDLE wevent ) { struct poll_node * node ; ovs_assert ( ! fd != ! wevent ) ; HMAP_FOR_EACH_WITH_HASH ( node , hmap_node , hash_2words ( fd , ( uint32_t ) wevent ) , & loop -> poll_nodes ) { if ( ( fd && node -> pollfd . fd == fd ) || ( wevent && node -> wevent == wevent ) ) { return node ; } } return NULL ; }
Look up the node with same fd or wevent.
Look up the node with same fd or wevent .
/* Both 'fd' and 'wevent' cannot be set. */