예제 #1
0
void flounder_support_trigger_chan(struct waitset_chanstate *wc)
{
    if (waitset_chan_is_registered(wc)) {
        errval_t err = waitset_chan_trigger(wc);
        assert(err_is_ok(err)); // shouldn't fail if registered
    }
}
예제 #2
0
파일: waitset.c 프로젝트: Karamax/arrakis
/**
 * \brief Poll an incoming UMP endpoint.
 * This is logically part of the UMP endpoint implementation, but placed here
 * for easier inlining.
 */
static inline void ump_endpoint_poll(struct waitset_chanstate *chan)
{
    /* XXX: calculate location of endpoint from waitset channel state */
    struct ump_endpoint *ep = (struct ump_endpoint *)
        ((char *)chan - offsetof(struct ump_endpoint, waitset_state));

    if (ump_endpoint_can_recv(ep)) {
        errval_t err = waitset_chan_trigger(chan);
        assert(err_is_ok(err)); // should not be able to fail
    }
}