use 1 counter instead of 2 in semaphore barrier and update spin files