[ref] Move all mutex logic to com.c; cleaner interface UNTESTED !!!