From 89969b4b0bea3bd4cddf97c989ca63f3a1aaa07c Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 26 May 2025 10:26:12 -0400 Subject: Add support for __attribute__((counted_by(...))) --- src/ioq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ioq.c') diff --git a/src/ioq.c b/src/ioq.c index 1efedd7..57eb4a5 100644 --- a/src/ioq.c +++ b/src/ioq.c @@ -203,7 +203,7 @@ struct ioqq { cache_align atomic size_t tail; /** The circular buffer itself. */ - cache_align ioq_slot slots[]; + cache_align ioq_slot slots[]; // _counted_by(slot_mask + 1) }; /** Destroy an I/O command queue. */ @@ -593,7 +593,7 @@ struct ioq { /** The number of background threads. */ size_t nthreads; /** The background threads themselves. */ - struct ioq_thread threads[]; + struct ioq_thread threads[] _counted_by(nthreads); }; /** Cancel a request if we need to. */ -- cgit v1.2.3