C PThreads with the sleeping barber algorithm