From 0aa6b262aeeea7ba24a75e3a89c9c767f35f05a6 Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Tue, 15 Apr 2025 01:25:24 -0600 Subject: libcr_ipc: Have generic cr_chan_* funcs instead of chan-specific funcs --- lib9p/srv.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib9p/srv.c') diff --git a/lib9p/srv.c b/lib9p/srv.c index 7e2bab0..d3748b7 100644 --- a/lib9p/srv.c +++ b/lib9p/srv.c @@ -45,14 +45,14 @@ static_assert(CONFIG_9P_SRV_MAX_HOSTMSG_SIZE <= SSIZE_MAX); bool lib9p_srv_flush_requested(struct lib9p_srv_ctx *ctx) { assert(ctx); - return _lib9p_srv_flushch_can_send(&ctx->flushch); + return cr_chan_can_send(&ctx->flushch); } void lib9p_srv_acknowledge_flush(struct lib9p_srv_ctx *ctx) { assert(ctx); - assert(_lib9p_srv_flushch_can_send(&ctx->flushch)); + assert(cr_chan_can_send(&ctx->flushch)); lib9p_error(&ctx->basectx, LIB9P_ERRNO_L_ECANCELED, "request canceled by flush"); - _lib9p_srv_flushch_send(&ctx->flushch, true); + cr_chan_send(&ctx->flushch, true); } /* structs ********************************************************************/ @@ -580,8 +580,8 @@ void lib9p_srv_worker_loop(struct lib9p_srv *srv) { handle_message(&req); /* Release resources. ****************************************/ - while (_lib9p_srv_flushch_can_send(&req.flushch)) - _lib9p_srv_flushch_send(&req.flushch, false); + while (cr_chan_can_send(&req.flushch)) + cr_chan_send(&req.flushch, false); map_del(&req.parent_sess->reqs, req.tag); if (req.parent_sess->closing && !map_len(&req.parent_sess->reqs)) cr_unpause(req.parent_sess->parent_conn->reader); @@ -868,7 +868,7 @@ static void handle_Tflush(struct srv_req *ctx, struct srv_req **oldreqp = map_load(&ctx->parent_sess->reqs, req->oldtag); if (oldreqp) - _lib9p_srv_flushch_recv(&((*oldreqp)->flushch)); + cr_chan_recv(&((*oldreqp)->flushch)); } static void handle_Twalk(struct srv_req *ctx, -- cgit v1.2.3-2-g168b