liblock: add more mutex helpers

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>