Beispiel #1
0
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 ();
}
Beispiel #2
0
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"); 
}