Implement thread control primitives for Win32.