void init_win32 (void) { if (WSAStartup(0x0101, &wsa_state)) { msg (M_ERR, "WSAStartup failed"); } window_title_clear (&window_title); win32_signal_clear (&win32_signal); netcmd_semaphore_init (); }
void netcmd_semaphore_lock (void) { const int timeout_seconds = 600; if (!netcmd_semaphore.hand) netcmd_semaphore_init (); if (!semaphore_lock (&netcmd_semaphore, timeout_seconds * 1000)) msg (M_FATAL, "Cannot lock net command semaphore"); }