Found missing cond_signal that was causing a lockup. Also fixed a couple preproc
directives to compile correctly under linux.