summary refs log tree commit diff
path: root/ring.c
diff options
context:
space:
mode:
Diffstat (limited to 'ring.c')
-rw-r--r--ring.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ring.c b/ring.c
index d66961d..912d0d3 100644
--- a/ring.c
+++ b/ring.c
@@ -16,6 +16,7 @@
 
 #include <assert.h>
 #include <err.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <sysexits.h>
 #include <time.h>
@@ -79,3 +80,13 @@ const char *ringConsume(time_t *time, size_t consumer) {
 	if (time) *time = ring.times[i];
 	return ring.lines[i];
 }
+
+void ringInfo(void) {
+	fprintf(stderr, "producer: %zu\n", ring.write);
+	for (size_t i = 0; i < read.len; ++i) {
+		fprintf(
+			stderr, "consumer %s: %zu (%zu)\n",
+			read.names[i], read.ptrs[i], ring.write - read.ptrs[i]
+		);
+	}
+}
ac5c0b611f6bafc&follow=1'>Add DawnJune McEnroe 2019-05-20Declare vasprintf(3) for GNUJune McEnroe 2019-05-20Fix comparison warning in ttpreJune McEnroe 2019-05-20Add AuthorityJune McEnroe 2019-05-19Specify precedence of unary versions of operatorsJune McEnroe 2019-05-18Add compound assignment operators to orderJune McEnroe 2019-05-15Support simple assignment in orderJune McEnroe 2019-05-15Implement sizeof in orderJune McEnroe 2019-05-15Add orderJune McEnroe 2019-05-12Add T suffix in bitJune McEnroe 2019-05-10Highlight yacc and lex files as CJune McEnroe 2019-05-10Use val instead of suboptargJune McEnroe 2019-05-09Add Parable of the SowerJune McEnroe 2019-05-07Add bit without buildJune McEnroe 2019-05-04Fix MANDIR typoJune McEnroe 2019-05-04Move relay to binJune McEnroe