a mutex lock support linux and windows