Example #1
0
  public static void main(String[] args) {
    RealtimeThread rt = new SigEvt();
    rt.start();

    try {
      rt.join();
    } catch (InterruptedException e) {
    }
    System.exit(0);
  }
Example #2
0
 protected void returnToPool() {
   RealtimeThread.currentRealtimeThread().setPriority(_defPrio);
   synchronized (_sem) {
     try {
       _sem.wait();
     } catch (InterruptedException e) {
       e.printStackTrace();
     }
   }
 }
Example #3
0
  public void run() {
    // make sure this has been initialized
    if (stacksize >= 0) {
      ThreadPool tp;
      if (lanes == null) {
        tp =
            new ThreadPool(
                stacksize,
                staticThreads,
                dynamicThreads,
                defaultPriority,
                allowRequestBuffering,
                maxBufferedRequests,
                maxRequestBufferSize,
                orb,
                rtorb.acceptorRunnable,
                rtorb.tpID);
      } else {
        tp =
            new ThreadPool(
                stacksize,
                allowRequestBuffering,
                maxBufferedRequests,
                maxRequestBufferSize,
                lanes,
                allowBorrowing,
                orb,
                rtorb.acceptorRunnable,
                rtorb.tpID);
        lanes.free();
      }
      orb.threadpoolList[rtorb.tpID] = (ScopedMemory) RealtimeThread.getCurrentMemoryArea();

      ((ScopedMemory) orb.threadpoolList[rtorb.tpID]).setPortal(tp);
      stacksize = -1;
    }
  }