commit a34a636c63b9a70862b2f59ff9b85312faa4d27f parent 08e346972497aed49e42a7cc71fc23dcc977049f Author: William Lindholm <william_lindholm@outlook.com> Date: Tue, 3 Dec 2024 19:20:54 +0000 Explained the queue is empty function Diffstat:
| M | Project2/Project2/main.c | | | 5 | +++++ |
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/Project2/Project2/main.c b/Project2/Project2/main.c @@ -348,8 +348,13 @@ void sendmsg (char *s) } } +/************************************************************************/ +/* Check if send queue is empty */ +/************************************************************************/ bool queue_is_empty() { + // Compare if the send counter has caught up to the queue counter, + // if it has, everything has been sent. return (qcntr == sndcntr); }