add pthread cond and mutex hook