a semaphore class written with eventfd