update cond ,mutex and lock