Merge "Switch from racy notify()/wait() to using a proper semaphore." into lmp-dev