public static void TermNet() { if (RxRunning) { RxRunning = false; Console.Error.WriteLine("Waiting for RX-net thread to terminate.."); rx_thread.Join(); Console.Error.WriteLine(".done\n"); nif.shutdown(); nif = null; } }
public static int _DEV9open() { netHeader.NetAdapter na = GetNetAdapter(); if (na == null) { Console.Error.WriteLine("Failed to GetNetAdapter()"); } else { net.InitNet(na); } return(0); }
public static void InitNet(netHeader.NetAdapter ad) { nif = ad; RxRunning = true; //System.Threading.ParameterizedThreadStart rx_setup = new System.Threading.ParameterizedThreadStart() //rx_setup rx_thread = new System.Threading.Thread(NetRxThread); rx_thread.Priority = System.Threading.ThreadPriority.Highest; //rx_thread = CreateThread(0, 0, NetRxThread, 0, CREATE_SUSPENDED, 0); //SetThreadPriority(rx_thread, THREAD_PRIORITY_HIGHEST); //ResumeThread(rx_thread); rx_thread.Start(); }