introduced semaphore to coordinate read/write mifare.