- Timestamp:
- Oct 15, 2001, 12:44:49 AM (24 years ago)
- Location:
- trunk/ArchTOIPipe/Kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/Kernel/fitstoirdr.cc
r1695 r1696 1 1 #include "fitstoirdr.h" 2 2 #include "toimanager.h" 3 3 #include <sched.h> 4 4 5 5 … … 128 128 << firstSn << endl; 129 129 130 fits_lock(); 130 131 for (int i=0; i<nrows; i++) { 131 132 int anyNul; 132 133 double y; 133 fits_lock();134 134 fits_read_col_dbl(fptr,1,i+1,1,1,0,&y,&anyNul,&fstatus); 135 fits_unlock();135 //fits_unlock(); 136 136 int sn = (int) (y+.1); 137 137 TOIManager* mgr = TOIManager::getManager(); … … 142 142 int j = colsinput[k].first; 143 143 if ( !checkOutputTOIIndex(k) ) continue; // Reza - Si TOI non connecte 144 fits_lock();144 // fits_lock(); 145 145 fits_read_col_dbl(fptr,j+1,i+1,1,1,0,&y,&anyNul,&fstatus); 146 146 long flg = 0; … … 148 148 fits_read_col_lng(fptr,j+2,i+1,1,1,0,&flg,&anyNul,&fstatus); 149 149 } 150 // fits_unlock(); 151 putData(k, sn, y, flg); 152 } 153 if (i%50==0) { 150 154 fits_unlock(); 151 putData(k, sn, y, flg); 155 sched_yield(); 156 fits_lock(); 152 157 } 153 158 totnscount++; 154 159 } 160 fits_unlock(); 155 161 cout << "reader done reading... " << pthread_self() << endl; 156 162 } -
trunk/ArchTOIPipe/Kernel/fitstoiwtr.cc
r1692 r1696 1 1 #include "fitstoiwtr.h" 2 2 #include "toimanager.h" 3 3 #include <sched.h> 4 4 5 5 … … 131 131 } 132 132 wontNeedBefore(sn); 133 fits_lock();134 133 // if ((sn%2000 == 0) || (sn<snb+5)) 135 134 //cout << " DBG-B-FitsWriter::run()" << sn << endl; 136 135 double xx = sn; 136 fits_lock(); 137 137 fits_write_col_dbl(fptr, 1, fitsLine, 1, 1, &xx, &fstatus); 138 138 … … 150 150 } 151 151 fits_unlock(); 152 if (fitsLine%50==0) { 153 sched_yield(); 154 } 152 155 // if ((sn%2000 == 0) || (sn<snb+5)) 153 156 // cout << " DBG-C-FitsWriter::run()" << sn << " line=" << fitsLine << endl;
Note:
See TracChangeset
for help on using the changeset viewer.