add pthread condition.