diff options
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) |