Ignore:
Timestamp:
Nov 9, 2001, 12:23:58 AM (24 years ago)
Author:
aubourg
Message:

une optim pour quand on n'a que des segmented

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ArchTOIPipe/Kernel/toiprocessor.cc

    r1738 r1740  
    33//                               Christophe Magneville
    44//                               Reza Ansari
    5 // $Id: toiprocessor.cc,v 1.13 2001-11-08 15:47:46 aubourg Exp $
     5// $Id: toiprocessor.cc,v 1.14 2001-11-08 23:23:58 aubourg Exp $
    66
    77#include "toiprocessor.h"
     
    311311double TOIProcessor::getData(int toiIndex, int i) {
    312312  TOI* toi = getInputTOI(toiIndex);
    313   toi->waitForData(i);
     313  if (toi->needSyncOldWay()) toi->waitForData(i); // seulement pour autre que segmented
     314  autoWontNeed(i);
    314315  return toi->getData(i);
    315316}
     
    318319{
    319320  TOI* toi = getInputTOI(toiIndex);
    320   toi->waitForData(i);
     321  if (toi->needSyncOldWay()) toi->waitForData(i); // seulement pour autre que segmented
    321322  toi->getData(i, data, flag);
    322323  return;
     
    359360
    360361void TOIProcessor::notify() {
    361   lock();
    362 /*  if (mutex.__m_lock.__status == 0) {
    363     cout << "wait without lock" << endl; abort();
    364   }*/
    365  
     362  lock(); 
    366363  pthread_cond_broadcast(&dataReady);
    367364  unlock();
     
    373370  toi->putData(i, value, flg);
    374371  autoWontNeed(i);
    375   notify();
     372  if (toi->needSyncOldWay())  notify(); // seulement pour non segmented
    376373}
    377374
Note: See TracChangeset for help on using the changeset viewer.