Use futexes for thread wait/signal on linux.