Changeset 6172
- Timestamp:
- 02/13/07 21:38:28
- Files:
-
- OpenThreads/trunk/win32_src/Win32Thread.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
OpenThreads/trunk/win32_src/Win32Thread.cpp
r6096 r6172 188 188 189 189 if(getenv("OUTPUT_THREADLIB_SCHEDULING_INFO") != 0) 190 PrintThreadSchedulingInfo(thread);190 PrintThreadSchedulingInfo(thread); 191 191 192 192 return status!=0; … … 548 548 Win32ThreadPrivateData *pd = static_cast<Win32ThreadPrivateData *> (_prvData); 549 549 DWORD affinityMask = 0x1 << cpunum ; // thread affinity mask 550 DWORD_PTR res =551 SetThreadAffinityMask552 (553 pd->tid.get(), // handle to thread554 affinityMask// thread affinity mask555 );550 DWORD_PTR res = 551 SetThreadAffinityMask 552 ( 553 pd->tid.get(), // handle to thread 554 affinityMask // thread affinity mask 555 ); 556 556 /* 557 This one is funny.558 This is "non-mandatory" affinity , winows will try to use dwIdealProcessor559 whenever possible ( when Bill's account is over 50B, maybe :-) ).560 561 DWORD SetThreadIdealProcessor(562 HANDLE hThread, // handle to the thread563 DWORD dwIdealProcessor // ideal processor number564 );557 This one is funny. 558 This is "non-mandatory" affinity , winows will try to use dwIdealProcessor 559 whenever possible ( when Bill's account is over 50B, maybe :-) ). 560 561 DWORD SetThreadIdealProcessor( 562 HANDLE hThread, // handle to the thread 563 DWORD dwIdealProcessor // ideal processor number 564 ); 565 565 */ 566 // return value 1 means call is ignored ( 9x/ME/SE )567 if( res == 1 ) return -1;568 // return value 0 is failure569 return (res == 0) ? GetLastError() : 0 ;566 // return value 1 means call is ignored ( 9x/ME/SE ) 567 if( res == 1 ) return -1; 568 // return value 0 is failure 569 return (res == 0) ? GetLastError() : 0 ; 570 570 } 571 571
