rear <= LIMIT - 1 signifies that rear must wrap around

if((*pq).rear <= (LIMIT - 1))