Changeset 7712
- Timestamp:
- 12/17/07 21:57:49
- Files:
-
- OpenThreads/trunk/src/OpenThreads/win32/WIN32Condition.cpp (modified) (6 diffs)
- OpenThreads/trunk/src/OpenThreads/win32/Win32Mutex.cpp (modified) (5 diffs)
- OpenThreads/trunk/src/OpenThreads/win32/Win32Thread.cpp (modified) (5 diffs)
- OpenThreads/trunk/src/OpenThreads/win32/Win32ThreadBarrier.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
OpenThreads/trunk/src/OpenThreads/win32/WIN32Condition.cpp
r6584 r7712 27 27 //---------------------------------------------------------------------------- 28 28 // 29 // De cription: Constructor29 // Description: Constructor 30 30 // 31 31 // Use: public. … … 38 38 //---------------------------------------------------------------------------- 39 39 // 40 // De cription: Destructor40 // Description: Destructor 41 41 // 42 42 // Use: public. … … 51 51 //---------------------------------------------------------------------------- 52 52 // 53 // De cription: wait on a condition53 // Description: wait on a condition 54 54 // 55 55 // Use: public. … … 64 64 //---------------------------------------------------------------------------- 65 65 // 66 // De cription: wait on a condition, for a specified period of time66 // Description: wait on a condition, for a specified period of time 67 67 // 68 68 // Use: public. … … 77 77 //---------------------------------------------------------------------------- 78 78 // 79 // De cription: signal a thread to wake up.79 // Description: signal a thread to wake up. 80 80 // 81 81 // Use: public. … … 89 89 //---------------------------------------------------------------------------- 90 90 // 91 // De cription: signal many threads to wake up.91 // Description: signal many threads to wake up. 92 92 // 93 93 // Use: public. OpenThreads/trunk/src/OpenThreads/win32/Win32Mutex.cpp
r6584 r7712 78 78 //---------------------------------------------------------------------------- 79 79 // 80 // De cription: Constructor80 // Description: Constructor 81 81 // 82 82 // Use: public. … … 89 89 //---------------------------------------------------------------------------- 90 90 // 91 // De cription: Destructor91 // Description: Destructor 92 92 // 93 93 // Use: public. … … 99 99 //---------------------------------------------------------------------------- 100 100 // 101 // De cription: lock the mutex101 // Description: lock the mutex 102 102 // 103 103 // Use: public. … … 162 162 //---------------------------------------------------------------------------- 163 163 // 164 // De cription: unlock the mutex164 // Description: unlock the mutex 165 165 // 166 166 // Use: public. … … 191 191 //---------------------------------------------------------------------------- 192 192 // 193 // De cription: test if the mutex may be locked193 // Description: test if the mutex may be locked 194 194 // 195 195 // Use: public. OpenThreads/trunk/src/OpenThreads/win32/Win32Thread.cpp
r7470 r7712 229 229 //---------------------------------------------------------------------------- 230 230 // 231 // De cription: Constructor231 // Description: Constructor 232 232 // 233 233 // Use: public. … … 255 255 //---------------------------------------------------------------------------- 256 256 // 257 // De cription: Destructor257 // Description: Destructor 258 258 // 259 259 // Use: public. … … 328 328 //------------------------------------------------------------------------- 329 329 // Prohibit the stack size from being changed. 330 // (bb 5/13/2005) it ac ctualy doesn't matter.331 // 1) usually setStackSize()/start() sequence i zserialized.330 // (bb 5/13/2005) it actually doesn't matter. 331 // 1) usually setStackSize()/start() sequence is serialized. 332 332 // 2) if not than we're in trouble anyway - nothing is protected 333 333 // pd->stackSizeLocked = true; … … 469 469 //----------------------------------------------------------------------------- 470 470 // 471 // Description: set the thread to cancel at the next conv ienent point.471 // Description: set the thread to cancel at the next convenient point. 472 472 // 473 473 // Use: public … … 577 577 /* 578 578 This one is funny. 579 This is "non-mandatory" affinity , win ows will try to use dwIdealProcessor579 This is "non-mandatory" affinity , windows will try to use dwIdealProcessor 580 580 whenever possible ( when Bill's account is over 50B, maybe :-) ). 581 581 OpenThreads/trunk/src/OpenThreads/win32/Win32ThreadBarrier.cpp
r6584 r7712 30 30 //---------------------------------------------------------------------------- 31 31 // 32 // De cription: Constructor32 // Description: Constructor 33 33 // 34 34 // Use: public. … … 44 44 //---------------------------------------------------------------------------- 45 45 // 46 // De cription: Destructor46 // Description: Destructor 47 47 // 48 48 // Use: public. … … 55 55 //---------------------------------------------------------------------------- 56 56 // 57 // De cription: Reset the barrier to its original state57 // Description: Reset the barrier to its original state 58 58 // 59 59 // Use: public. … … 67 67 //---------------------------------------------------------------------------- 68 68 // 69 // De cription: Block until numThreads threads have entered the barrier.69 // Description: Block until numThreads threads have entered the barrier. 70 70 // 71 71 // Use: public. … … 86 86 87 87 if (pd->cnt == pd->maxcnt) { // I am the last one 88 pd->cnt = 0; // reset for next use89 pd->phase = 1 - my_phase; // toggle phase90 pd->cond.broadcast();88 pd->cnt = 0; // reset for next use 89 pd->phase = 1 - my_phase; // toggle phase 90 pd->cond.broadcast(); 91 91 }else{ 92 while (pd->phase == my_phase ) {93 pd->cond.wait(&pd->lock);94 }95 }92 while (pd->phase == my_phase ) { 93 pd->cond.wait(&pd->lock); 94 } 95 } 96 96 } 97 97 } … … 102 102 static_cast<Win32BarrierPrivateData*>(_prvData); 103 103 104 pd->lock.lock();105 _valid = false;106 pd->lock.unlock();107 release();104 pd->lock.lock(); 105 _valid = false; 106 pd->lock.unlock(); 107 release(); 108 108 } 109 109
