thread: cond and mutex macros.