added single writer multiple reader lock-semaphore implementation fix