From 7ff738390e55d57a0f513c467a9da3b08c6902ab Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Tue, 29 Oct 2024 01:02:02 -0600 Subject: Add a way to make private object members --- lib9p/srv.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lib9p/srv.c') diff --git a/lib9p/srv.c b/lib9p/srv.c index 3a3807c..9192794 100644 --- a/lib9p/srv.c +++ b/lib9p/srv.c @@ -16,9 +16,25 @@ #include #include +#define IMPLEMENTATION_FOR_LIB9P_SRV_H YES #include #include "internal.h" +/* context ********************************************************************/ + +bool lib9p_srv_flush_requested(struct lib9p_srv_ctx *ctx) { + assert(ctx); + return _lib9p_srv_flushch_can_send(&ctx->_flushch); +} + +int lib9p_srv_acknowledge_flush(struct lib9p_srv_ctx *ctx) { + assert(ctx); + assert(_lib9p_srv_flushch_can_send(&ctx->_flushch)); + lib9p_error(&ctx->basectx, LINUX_ECANCELED, "request canceled by flush"); + _lib9p_srv_flushch_send(&ctx->_flushch, true); + return -1; +} + /* structs ********************************************************************/ #define FIDFLAG_OPEN_R (1<<0) -- cgit v1.2.3-2-g168b