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

    try {
      rt.join();
    } catch (InterruptedException e) {
    }
    System.exit(0);
  }
コード例 #2
0
 protected void returnToPool() {
   RealtimeThread.currentRealtimeThread().setPriority(_defPrio);
   synchronized (_sem) {
     try {
       _sem.wait();
     } catch (InterruptedException e) {
       e.printStackTrace();
     }
   }
 }
コード例 #3
0
ファイル: ThreadPoolRunnable.java プロジェクト: kraman/RTZen
  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;
    }
  }