diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-10-29 01:02:02 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-10-29 01:40:02 -0600 |
commit | 7ff738390e55d57a0f513c467a9da3b08c6902ab (patch) | |
tree | 384bd03462a9790c9c747b895cf5de0677659db7 /lib9p/srv.c | |
parent | affe77a2b068a9de236f0d7703092dbfafacff5e (diff) |
Add a way to make private object members
Diffstat (limited to 'lib9p/srv.c')
-rw-r--r-- | lib9p/srv.c | 16 |
1 files changed, 16 insertions, 0 deletions
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 <libcr_ipc/select.h> #include <libmisc/vcall.h> +#define IMPLEMENTATION_FOR_LIB9P_SRV_H YES #include <lib9p/srv.h> #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) |