Esempio n. 1
0
 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;
     }
 }
Esempio n. 2
0
 public static int _DEV9open()
 {
     netHeader.NetAdapter na = GetNetAdapter();
     if (na == null)
     {
         Console.Error.WriteLine("Failed to GetNetAdapter()");
     }
     else
     {
         net.InitNet(na);
     }
     return(0);
 }
Esempio n. 3
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();
        }