Hi All,

we have designed a FIFO queue with pthread mutex and its conditionWait(), inside the queue, we use std:eque, which is quite efficient. and we only enqueue & dequeue pointers to objects, that is also as efficient as posible.

however the time taken to enqueue/dequeue a pointer into/from the queue takes about 2-3 microseconds.

I guess most of the time taken is by context switch, do you have any idea to achieve a better performance by using different locks and avoid context switching?

We have tried atomic operation with pure integer array, it seems not to help much.

Thanks a lot in advance! Appreciate your replies.
sandodo