diff --git a/include/toksvc/toksvc.h b/include/toksvc/toksvc.h index a4dcf63..bb55ba0 100644 --- a/include/toksvc/toksvc.h +++ b/include/toksvc/toksvc.h @@ -183,6 +183,7 @@ struct toks_token_info { struct toks_token_ctx { int32_t allocated; int32_t available; + int32_t pending; int32_t tused; int32_t tfree; struct toks_token_info tokens[]; diff --git a/src/daemon/toks_daemon_ioctl.c b/src/daemon/toks_daemon_ioctl.c index c1e7c4b..fa5eec1 100644 --- a/src/daemon/toks_daemon_ioctl.c +++ b/src/daemon/toks_daemon_ioctl.c @@ -253,6 +253,7 @@ static int32_t toks_daemon_ioctl_get_token_info(struct toks_daemon_ctx * dctx) stctx.allocated = toks_get_driver_atokens(dctx->driver_ctx); stctx.available = toks_get_driver_ntokens(dctx->driver_ctx); + stctx.pending = toks_get_driver_nwaiters(dctx->driver_ctx); stctx.tused = dctx->utokens; stctx.tfree = dctx->ftokens; } else { @@ -270,6 +271,7 @@ static int32_t toks_daemon_ioctl_get_token_info(struct toks_daemon_ctx * dctx) tctx->allocated = toks_get_driver_atokens(dctx->driver_ctx); tctx->available = toks_get_driver_ntokens(dctx->driver_ctx); + tctx->pending = toks_get_driver_nwaiters(dctx->driver_ctx); tctx->tused = dctx->utokens; tctx->tfree = dctx->ftokens; } diff --git a/src/internal/toksvc_daemon_impl.h b/src/internal/toksvc_daemon_impl.h index e6aff95..f96cba1 100644 --- a/src/internal/toksvc_daemon_impl.h +++ b/src/internal/toksvc_daemon_impl.h @@ -41,6 +41,7 @@ struct toks_client_ctx { struct toks_token_sctx { int32_t allocated; int32_t available; + int32_t pending; int32_t tused; int32_t tfree; struct toks_token_info tokens[512];