make.sh: adjust mutex lock position