Added mutex around clGetPlatformIds