core: simplify mutex signatures

Fixes #1436
Wasn't there a problem with constructs like this and C++?