High-performance fixed-length integer queue implementation in C