delete unused mutex in codegen.cpp