Simple mutex - but its not re-entrant.
Seems to be reentrant - but I don't know enough to test it properly.