Hi there. Thank yopu very much for you helpful comment. I appreciated it very much, especially the part where you say that what I write does not make sense.

But let's move forward and let's take the discussion on technical issues rather than personal judgments.

The idea underlying my class is to have a circular buffer able to serve one producer and several consumers. All the consumers must be able to read each byte produced by the producer, and the producer must wait until all the consumers have retrieved the produced data. I do not see anything like that in your implementation.

Furthermore, there are no arrays of arrays of semaphores. There is one array of pointers to semaphores. Each semaphore is related to a different consumer, and since all the consumers live a separate life, there must be an independent semaphore for each one of them.

Thank you anyway.