Got rid of the semaphores.

Got rid of the semaphores. Now using an integer to count the number of
reads. It seems to work (but it's slower than the iterative version!)

Next thing to try: Locks and Conditions.