Adjust semaphore ajust algorithm.