X-Git-Url: http://git.barrelfish.org/?p=barrelfish;a=blobdiff_plain;f=include%2Fbarrelfish%2Fump_endpoint.h;h=e7bc47d71b2074a1fd9048a82d0b840b8e23c3f3;hp=f6800efac05e9a106467d660136c3b901e85ab82;hb=b0e04368bb148daeef031ed5130b326a789be31a;hpb=c8e80109fae0fb63ff8be165b3d16d512efa0fac diff --git a/include/barrelfish/ump_endpoint.h b/include/barrelfish/ump_endpoint.h index f6800ef..e7bc47d 100644 --- a/include/barrelfish/ump_endpoint.h +++ b/include/barrelfish/ump_endpoint.h @@ -37,7 +37,7 @@ errval_t ump_endpoint_deregister(struct ump_endpoint *ep); void ump_endpoint_migrate(struct ump_endpoint *ep, struct waitset *ws); /** - * \brief Returns true iff there is a message pending on the given UMP endpoint + * \brief Returns true if there is a message pending on the given UMP endpoint */ static inline bool ump_endpoint_can_recv(struct ump_endpoint *ep) { @@ -64,15 +64,17 @@ static inline errval_t ump_endpoint_recv(struct ump_endpoint *ep, } } +/** + * \brief Return true if there's a message available + * + * \param channel UMP channal + */ static inline bool ump_endpoint_poll(struct waitset_chanstate *channel) { struct ump_endpoint *ep = (struct ump_endpoint *) ((char *)channel - offsetof(struct ump_endpoint, waitset_state)); - if (ump_endpoint_can_recv(ep)) { - return true; - } - return false; + return ump_endpoint_can_recv(ep); }