Semaforo com buffer circular