hype: correctly lock thread mutexes
hype: correctly lock thread mutexes

The mutex must be locked before the thread is started, and also locked/unlocked
before/after sending the signal.

Otherwise if the new thread reaches pthread_cond_signal() before the main thread
calls pthread_cond_wait(), the signal is lost.

ghedo/pktizr,ghedo/pktizr,ghedo/pktizr