From 33094ece07ac232e99421162114577591a996d4d Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sat, 30 Jul 2022 19:25:32 -0700 Subject: [PATCH] ircd::gpt: Fix doc comment on count vs. tokens. [ci skip] --- include/ircd/gpt/ctrl.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/include/ircd/gpt/ctrl.h b/include/ircd/gpt/ctrl.h index 2fe32e319..c1f8a9173 100644 --- a/include/ircd/gpt/ctrl.h +++ b/include/ircd/gpt/ctrl.h @@ -94,14 +94,16 @@ struct ircd_gpt_ctrl /// commanded by the host. Effectively minimum distance until next accept. uint dispatch; - /// Token counter. The counter indicates the number of valid tokens in - /// the context buffer. This value must not exceed the opts.buffer_size. - /// This value should not exceed the opts.context_size at least for now. + /// Token counter. The counter indicates the number of tokens in the + /// context buffer, the last token residing at `buffer[count-1]`. Each + /// cycle produces the next token at `buffer[count]`; increments count. uint count; - /// Token counter. The counter indicates the number of valid tokens in - /// the context buffer. This value must not exceed the opts.buffer_size. - /// This value should not exceed the opts.context_size at least for now. + /// Token counter. The counter indicates the actual number of valid tokens + /// in the context buffer. The value is always `>= count`. Tokens are only + /// generated to `buffer[count]` when `tokens == count` and both are + /// incremented in unison. When `tokens > count` generated tokens are only + /// evaluated against the existing context buffer and `tokens` not incr. uint tokens; /// Master clock.