snarfed a pthread mutex example