change PlatformSpecificMutex functions to function pointers
clean up do while(0)