simpler version of mutex

that uses single int