The lock function  accepts an _address_ to a mutex object. So you can either have a ptr-to-mutex variable, or a nonref variable and pass its address. It’s hopeless to pass-by-value (pbclone) because multiple threads must share the same mutex instance, not copies of it.
Since address is needed everywhere, it’s slightly simpler to use a ptr, but don’t forget to free the malloc.
Typically you can’t avoid malloc, because a mutex object on stack is not very useful. A mutex is typically used by multiple threads.
 Actually all pthread mutex functions