pthreads:  Define condition variable functions