Changeset 20816
- Timestamp:
- 09/16/07 20:52:20 (1 year ago)
- Files:
-
- juggler/trunk/modules/vapor/ChangeLog (modified) (1 diff)
- juggler/trunk/modules/vapor/VERSION (modified) (1 diff)
- juggler/trunk/modules/vapor/vpr/Thread/BaseThread.cpp (modified) (5 diffs)
- juggler/trunk/modules/vapor/vpr/Thread/BaseThread.h (modified) (7 diffs)
- juggler/trunk/modules/vapor/vpr/md/NSPR/Thread/ThreadNSPR.cpp (modified) (7 diffs)
- juggler/trunk/modules/vapor/vpr/md/NSPR/Thread/ThreadNSPR.h (modified) (12 diffs)
- juggler/trunk/modules/vapor/vpr/md/POSIX/Thread/ThreadPosix.cpp (modified) (8 diffs)
- juggler/trunk/modules/vapor/vpr/md/POSIX/Thread/ThreadPosix.h (modified) (13 diffs)
- juggler/trunk/modules/vapor/vpr/md/WIN32/Thread/ThreadWin32.cpp (modified) (4 diffs)
- juggler/trunk/modules/vapor/vpr/md/WIN32/Thread/ThreadWin32.h (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
juggler/trunk/modules/vapor/ChangeLog
r20815 r20816 1 1 DATE AUTHOR CHANGE 2 2 ---------- -------- ----------------------------------------------------------- 3 2007-09-16 patrick Removed polymorphism from vpr::BaseThread and vpr::Thread. 4 NEW VERSION: 2.1.7 3 5 2007-09-16 patrick Added vpr::ThreadWin32::setRunOn() and 4 6 vpr::ThreadWin32::getRunOn(). Added Linux-specific juggler/trunk/modules/vapor/VERSION
r20815 r20816 1 2.1.7-0 @09/16/2007 01:55:00 UTC@ 1 2 2.1.6-0 @09/16/2007 00:55:00 UTC@ 2 3 2.1.5-0 @08/22/2007 00:45:00 UTC@ juggler/trunk/modules/vapor/vpr/Thread/BaseThread.cpp
r19897 r20816 53 53 54 54 vpr::Int32 BaseThread::mNextThreadId = 0; 55 vpr::TSTable BaseThread:: gTSTable;55 vpr::TSTable BaseThread::sTSTable; 56 56 57 57 boost::signals::connection BaseThread:: … … 69 69 } 70 70 71 BaseThread::BaseThread() 72 : mThreadId(-1) 73 { 74 ; 75 } 76 77 BaseThread::~BaseThread() 78 { 79 /* Do nothing. */ ; 80 } 81 71 82 /** 72 83 * Ouputs the state of the object. … … 79 90 return out; 80 91 } 81 82 92 83 93 // ---- Ouput operator ---- // … … 96 106 } 97 107 98 void BaseThread::registerThread( bool succesfulCreation)108 void BaseThread::registerThread(const bool succesfulCreation) 99 109 { 100 if (succesfulCreation) // Succeed110 if ( succesfulCreation ) // Succeed 101 111 { 102 112 createThreadId(); 103 Thread* thread_ptr = dynamic_cast<Thread*>(this); 104 vprASSERT(NULL != thread_ptr); 105 ThreadManager::instance()->addThread(thread_ptr); // Add the thread to the table 113 // Add the thread to the table 114 ThreadManager::instance()->addThread(static_cast<Thread*>(this)); 106 115 } 107 116 else … … 113 122 void BaseThread::unregisterThread() 114 123 { 115 vpr::Thread * thread_ptr = dynamic_cast<vpr::Thread*>(this);116 vprASSERT(NULL != thread_ptr);117 vpr::ThreadManager::instance()->removeThread(thread_ptr);124 vpr::ThreadManager::instance()->removeThread( 125 static_cast<vpr::Thread*>(this) 126 ); 118 127 } 119 128 juggler/trunk/modules/vapor/vpr/Thread/BaseThread.h
r20676 r20816 39 39 #include <vpr/vprConfig.h> 40 40 41 #include <boost/noncopyable.hpp> 41 42 #include <boost/function.hpp> 42 43 #include <boost/signal.hpp> 44 43 45 #include <vpr/vprTypes.h> 44 46 #include <vpr/Thread/TSTable.h> /* Needed to cache a copy here */ … … 61 63 * Provides functionality that is common to all threading implementations. 62 64 * 63 * @note This class is not designed to be used as a polymorphic base class 64 * to hold references to threads. Just use the real thread type. 65 * @note This class is \em not designed to be used as a polymorphic base class 66 * to hold references to threads. The lack of virtual methods should 67 * make this fact self-evident. Just use the real thread type. 65 68 */ 66 class VPR_CLASS_API BaseThread 69 class VPR_CLASS_API BaseThread : private boost::noncopyable 67 70 { 68 71 public: … … 157 160 }; 158 161 159 BaseThread() : mThreadId(-1) 160 { 161 ; 162 } 163 164 virtual ~BaseThread() 165 { 166 ; 167 } 168 169 /** Sets the thread's functor--the code that will get executed. */ 170 virtual void setFunctor(const vpr::thread_func_t& functor) = 0; 171 172 /** Starts the thread's execution. */ 173 virtual void start() = 0; 162 protected: 163 BaseThread(); 164 165 ~BaseThread(); 174 166 175 167 public: // Thread specific data caching … … 185 177 } 186 178 179 const TSTable* getTSTable() const 180 { 181 return &mTSTable; 182 } 183 187 184 /** 188 185 * Get the Thread the global thread specific data table. … … 191 188 static TSTable* getGlobalTSTable() 192 189 { 193 return &gTSTable; 190 return &sTSTable; 191 } 192 193 /** 194 * Gets the "thread ID" of this vpr::BaseThread object. This is a unique 195 * integer value assigned when the thread was created. 196 * 197 * @return -1 is returned if this is a bad thread. This usually means that 198 * there was a creation error. 199 * @return Otherwise, the value returned is this thread's ID. 200 */ 201 vpr::Int32 getTID() const 202 { 203 return mThreadId; 204 } 205 206 /** 207 * Is this a valid thread? 208 * 209 * @return true is returned if this object represents a thread that has 210 * been spawned correctly. 211 * 212 * @note A true value may be returned before the spawned thread begins 213 * executing. This is due to the way that the operating system 214 * schedules a newly created thread. However, true is returned if 215 * and only if the thread has been spawned successfully. 216 */ 217 bool valid() const 218 { 219 return mThreadId != -1; 194 220 } 195 221 196 222 private: 197 223 TSTable mTSTable; /**< Thread specific data for the thread */ 198 static TSTable gTSTable; /**< Global thread specific data. Used in all224 static TSTable sTSTable; /**< Global thread specific data. Used in all 199 225 threads NOT created by vpr. (ie. the 200 226 primordial thread). */ 201 227 202 228 protected: 229 /** 230 * Ouputs the state of the object. 231 */ 232 std::ostream& outStream(std::ostream& out); 233 203 234 /** 204 235 * After the object has been created, call this routine to complete … … 214 245 * @param successfulCreation Did the thread get created correctly? 215 246 */ 216 void registerThread( bool successfulCreation);247 void registerThread(const bool successfulCreation); 217 248 218 249 void unregisterThread(); 219 250 220 public:221 /**222 * Causes the calling thread wait for the termination of this thread.223 *224 * @post The caller blocks until this thread finishes its execution.225 * This routine may return immediately if this thread has already226 * exited.227 *228 * @param status Current state of the terminating thread when that thread229 * calls the exit routine (optional).230 *231 * @note This implementation does onthing. See the derived classes for more232 * information.233 */234 virtual void join(void** = NULL)235 {236 /* Do nothing. */ ;237 }238 239 /**240 * Resumes the execution of this thread (if it was previously suspended241 * using suspend()).242 *243 * @note This implementation does nothing. See the derived classes for more244 * information.245 */246 virtual void resume()247 {248 /* Do nothing. */ ;249 }250 251 /**252 * Suspends the execution of this thread.253 *254 * @note This implementation does nothing. See the derived classes for more255 * information.256 */257 virtual void suspend()258 {259 /* Do nothing. */ ;260 }261 262 /**263 * Gets this thread's priority.264 *265 * @return This implementation always returns \c VPR_PRIORITY_NORMAL. See266 * the derived classes for more information.267 */268 virtual VPRThreadPriority getPrio()269 {270 return VPR_PRIORITY_NORMAL;271 }272 273 /**274 * Sets this thread's priority.275 *276 * @param prio The new priority for this thread.277 *278 * @note This implementation does nothing. See the derived classes for more279 * information.280 */281 virtual void setPrio(const VPRThreadPriority)282 {283 /* Do nothing. */ ;284 }285 286 /**287 * Gets the "thread ID" of this vpr::BaseThread object. This is a unique288 * integer value assigned when the thread was created.289 *290 * @return -1 is returned if this is a bad thread. This usually means that291 * there was a creation error.292 * @return Otherwise, the value returned is this thread's ID.293 */294 vpr::Int32 getTID()295 {296 return mThreadId;297 }298 299 /**300 * Is this a valid thread?301 *302 * @return true is returned if this object represents a thread that has303 * been spawned correctly.304 *305 * @note A true value may be returned before the spawned thread begins306 * executing. This is due to the way that the operating system307 * schedules a newly created thread. However, true is returned if308 * and only if the thread has been spawned successfully.309 */310 bool valid()311 {312 return (mThreadId != -1);313 }314 315 /**316 * Sends the specified signal to this thread (not necessarily \c SIGKILL).317 *318 * @post This thread receives the specified signal.319 *320 * @param signum The signal to send to this thread.321 *322 * @note This implementation does nothing. See the derived classes for323 * more information.324 */325 virtual void kill(const int)326 {327 /* Do nothing. */ ;328 }329 330 /**331 * Kills (cancels) this thread.332 *333 * @post This thread is cancelled. Immediate cancellation is not guaranteed.334 *335 * @note This implementation does nothing. See the derived classes for336 * more information.337 */338 virtual void kill()339 {340 /* Do nothing. */ ;341 }342 343 /**344 * Ouputs the state of the object.345 */346 virtual std::ostream& outStream(std::ostream& out);347 348 protected:349 251 /** 350 252 * Initializes the state of the object. … … 355 257 } 356 258 357 private: 358 /// Don't allow copy 359 BaseThread(BaseThread&) 360 {;} 361 362 protected: 363 vpr::Int32 mThreadId; //! The local id for the thread, -1 ==> invalid thread 364 365 // --- STATICS ---- // 259 protected: 260 /** 261 * The local ID for the thread. A value of -1 implies that this is an 262 * invalid thread. 263 */ 264 vpr::Int32 mThreadId; 366 265 367 266 private: juggler/trunk/modules/vapor/vpr/md/NSPR/Thread/ThreadNSPR.cpp
r19897 r20816 269 269 } 270 270 271 BaseThread::VPRThreadPriority ThreadNSPR::getPrio() 271 BaseThread::VPRThreadPriority ThreadNSPR::getPrio() const 272 272 { 273 273 return nsprThreadPriorityToVPR(PR_GetThreadPriority(mThread)); … … 284 284 // =========================================================================== 285 285 286 287 PRThreadPriority ThreadNSPR::vprThreadPriorityToNSPR(const VPRThreadPriority priority) 286 PRThreadPriority 287 ThreadNSPR::vprThreadPriorityToNSPR(const VPRThreadPriority priority) const 288 288 { 289 289 PRThreadPriority nspr_prio; … … 309 309 310 310 PRThreadScope ThreadNSPR::vprThreadScopeToNSPR(const VPRThreadScope scope) 311 const 311 312 { 312 313 PRThreadScope nspr_scope; … … 326 327 327 328 PRThreadState ThreadNSPR::vprThreadStateToNSPR(const VPRThreadState state) 329 const 328 330 { 329 331 PRThreadState nspr_state; … … 342 344 } 343 345 344 BaseThread::VPRThreadPriority ThreadNSPR::nsprThreadPriorityToVPR(const PRThreadPriority priority) 346 BaseThread::VPRThreadPriority 347 ThreadNSPR::nsprThreadPriorityToVPR(const PRThreadPriority priority) const 345 348 { 346 349 VPRThreadPriority vpr_prio; … … 365 368 } 366 369 367 BaseThread::VPRThreadScope ThreadNSPR::nsprThreadScopeToVPR(const PRThreadScope scope) 370 BaseThread::VPRThreadScope 371 ThreadNSPR::nsprThreadScopeToVPR(const PRThreadScope scope) const 368 372 { 369 373 VPRThreadScope vpr_scope; … … 383 387 } 384 388 385 BaseThread::VPRThreadState ThreadNSPR::nsprThreadStateToVPR(const PRThreadState state) 389 BaseThread::VPRThreadState 390 ThreadNSPR::nsprThreadStateToVPR(const PRThreadState state) const 386 391 { 387 392 VPRThreadState vpr_state; juggler/trunk/modules/vapor/vpr/md/NSPR/Thread/ThreadNSPR.h
r20815 r20816 145 145 * thread hash. 146 146 */ 147 virtual~ThreadNSPR();147 ~ThreadNSPR(); 148 148 149 149 /** … … 152 152 * @pre The thread is not already running. The functor is valid. 153 153 */ 154 v irtual void setFunctor(const vpr::thread_func_t& functor);154 void setFunctor(const vpr::thread_func_t& functor); 155 155 156 156 /** … … 167 167 * allocated. 168 168 */ 169 v irtual void start();169 void start(); 170 170 171 171 /** … … 185 185 * thrown by code executing in this thread and was not caught. 186 186 */ 187 v irtual void join(void** status = NULL);187 void join(void** status = NULL); 188 188 189 189 /** … … 201 201 * @note This operation is not currently supported with NSPR threads. 202 202 */ 203 v irtual void resume()203 void resume() 204 204 { 205 205 // this->kill(SIGCONT); … … 218 218 * @note This operation is not currently supported with NSPR threads. 219 219 */ 220 v irtual void suspend()220 void suspend() 221 221 { 222 222 // this->kill(SIGSTOP); … … 231 231 * thread (and thus cannot have its scheduling queried). 232 232 */ 233 virtual VPRThreadPriority getPrio();233 VPRThreadPriority getPrio() const; 234 234 235 235 /** … … 243 243 * enumerated type. 244 244 */ 245 v irtual void setPrio(const VPRThreadPriority prio);246 247 v irtual void setRunOn(const unsigned int)245 void setPrio(const VPRThreadPriority prio); 246 247 void setRunOn(const unsigned int) 248 248 { 249 249 /* Do nothing. */ ; 250 250 } 251 251 252 virtual std::vector<unsigned int> getRunOn()252 std::vector<unsigned int> getRunOn() const 253 253 { 254 254 return std::vector<unsigned int>(); … … 268 268 * @note This operation is not currently supported by NSPR threads. 269 269 */ 270 v irtual void kill(const int)270 void kill(const int) 271 271 { 272 272 /* Do nothing. */ ; … … 284 284 * @note This operation is not currently supported by NSPR threads. 285 285 */ 286 v irtual void kill()286 void kill() 287 287 { 288 288 /* Do nothing. */ ; … … 313 313 * Provides a way of printing the process ID neatly. 314 314 */ 315 virtualstd::ostream& outStream(std::ostream& out);315 std::ostream& outStream(std::ostream& out); 316 316 317 317 // All private member variables and functions. … … 343 343 vpr::CondVarNSPR mThreadStartCondVar; /**< CondVar for thread starting */ 344 344 345 PRThreadPriority vprThreadPriorityToNSPR(const VPRThreadPriority priority); 346 347 PRThreadScope vprThreadScopeToNSPR(const VPRThreadScope scope); 348 349 PRThreadState vprThreadStateToNSPR(const VPRThreadState state); 350 351 VPRThreadPriority nsprThreadPriorityToVPR(const PRThreadPriority priority); 352 353 VPRThreadScope nsprThreadScopeToVPR(const PRThreadScope scope); 354 355 VPRThreadState nsprThreadStateToVPR(const PRThreadState state); 345 PRThreadPriority vprThreadPriorityToNSPR(const VPRThreadPriority priority) 346 const; 347 348 PRThreadScope vprThreadScopeToNSPR(const VPRThreadScope scope) const; 349 350 PRThreadState vprThreadStateToNSPR(const VPRThreadState state) const; 351 352 VPRThreadPriority nsprThreadPriorityToVPR(const PRThreadPriority priority) 353 const; 354 355 VPRThreadScope nsprThreadScopeToVPR(const PRThreadScope scope) const; 356 357 VPRThreadState nsprThreadStateToVPR(const PRThreadState state) const; 356 358 357 359 static PRUint32 mTicksPerSec; juggler/trunk/modules/vapor/vpr/md/POSIX/Thread/ThreadPosix.cpp
r20815 r20816 328 328 329 329 // Get this thread's priority. 330 BaseThread::VPRThreadPriority ThreadPosix::getPrio() 330 BaseThread::VPRThreadPriority ThreadPosix::getPrio() const 331 331 { 332 332 #ifdef _POSIX_THREAD_PRIORITY_SCHEDULING … … 429 429 } 430 430 431 std::vector<unsigned int> ThreadPosix::getRunOn() 431 std::vector<unsigned int> ThreadPosix::getRunOn() const 432 432 { 433 433 std::vector<unsigned int> cpus; … … 543 543 544 544 int ThreadPosix::vprThreadPriorityToPOSIX(const VPRThreadPriority priority) 545 const 545 546 { 546 547 int posix_prio; … … 570 571 } 571 572 572 int ThreadPosix::vprThreadScopeToPOSIX(const VPRThreadScope scope) 573 int ThreadPosix::vprThreadScopeToPOSIX(const VPRThreadScope scope) const 573 574 { 574 575 int posix_scope; … … 590 591 } 591 592 592 int ThreadPosix::vprThreadStateToPOSIX(const VPRThreadState state) 593 int ThreadPosix::vprThreadStateToPOSIX(const VPRThreadState state) const 593 594 { 594 595 int posix_state; … … 611 612 612 613 BaseThread::VPRThreadPriority ThreadPosix:: 613 posixThreadPriorityToVPR(const int priority) 614 posixThreadPriorityToVPR(const int priority) const 614 615 { 615 616 VPRThreadPriority vpr_prio; … … 636 637 637 638 BaseThread::VPRThreadScope ThreadPosix::posixThreadScopeToVPR(const int scope) 639 const 638 640 { 639 641 VPRThreadScope vpr_scope; … … 671 673 672 674 BaseThread::VPRThreadState ThreadPosix::posixThreadStateToVPR(const int state) 675 const 673 676 { 674 677 VPRThreadState vpr_state; juggler/trunk/modules/vapor/vpr/md/POSIX/Thread/ThreadPosix.h
r20815 r20816 153 153 * thread hash. 154 154 */ 155 virtual~ThreadPosix();155 ~ThreadPosix(); 156 156 157 157 /** … … 160 160 * @pre The thread is not already running. The functor is valid. 161 161 */ 162 v irtual void setFunctor(const vpr::thread_func_t& functor);162 void setFunctor(const vpr::thread_func_t& functor); 163 163 164 164 /** … … 180 180 * creation of the thread. 181 181 */ 182 v irtual void start();182 void start(); 183 183 184 184 protected: … … 233 233 * thrown by code executing in this thread and was not caught. 234 234 */ 235 v irtual void join(void** status = NULL);235 void join(void** status = NULL); 236 236 237 237 /** … … 249 249 * @note This is not currently supported on HP-UX 10.20. 250 250 */ 251 v irtual void resume()251 void resume() 252 252 { 253 253 this->kill(SIGCONT); … … 266 266 * @note This is not currently supported on HP-UX 10.20. 267 267 */ 268 v irtual void suspend()268 void suspend() 269 269 { 270 270 this->kill(SIGSTOP); … … 286 286 * scheduling in their pthreads implementation. 287 287 */ 288 virtual VPRThreadPriority getPrio();288 VPRThreadPriority getPrio() const; 289 289 290 290 /** … … 302 302 * scheduling in their pthreads implementation. 303 303 */ 304 v irtual void setPrio(const VPRThreadPriority prio);304 void setPrio(const VPRThreadPriority prio); 305 305 306 306 /** … … 328 328 * @note Currently, this is only available on IRIX 6.5 and Linux. 329 329 */ 330 v irtual void setRunOn(const unsigned int cpu);330 void setRunOn(const unsigned int cpu); 331 331 332 332 /** … … 354 354 * @note Currently, this is only available on IRIX 6.5 and Linux. 355 355 * @note The return value of this method was changed from int to 356 * std::vector<unsigned int> in VPR 2.1. 7.357 */ 358 virtual std::vector<unsigned int> getRunOn();356 * std::vector<unsigned int> in VPR 2.1.6. 357 */ 358 std::vector<unsigned int> getRunOn() const; 359 359 360 360 /** … … 384 384 * @note This is not currently supported with Pthreads Draft 4. 385 385 */ 386 v irtual void kill(const int signum);386 void kill(const int signum); 387 387 388 388 /** … … 395 395 * cancellation is not guaranteed. 396 396 */ 397 v irtual void kill()397 void kill() 398 398 { 399 399 pthread_cancel(mThread); … … 437 437 438 438 /** Converts a VPR thread priority to its Pthread equivalent. */ 439 int vprThreadPriorityToPOSIX(const VPRThreadPriority priority) ;439 int vprThreadPriorityToPOSIX(const VPRThreadPriority priority) const; 440 440 441 441 /** Converts a VPR thread scope to its Pthread equivalent. */ 442 int vprThreadScopeToPOSIX(const VPRThreadScope scope) ;442 int vprThreadScopeToPOSIX(const VPRThreadScope scope) const; 443 443 444 444 /** Converts a VPR thread state value to its Pthread equivalent. */ 445 int vprThreadStateToPOSIX(const VPRThreadState state) ;445 int vprThreadStateToPOSIX(const VPRThreadState state) const; 446 446 447 447 /** Converts a Pthread thread priority to its VPR equivalent. */ 448 VPRThreadPriority posixThreadPriorityToVPR(const int priority) ;448 VPRThreadPriority posixThreadPriorityToVPR(const int priority) const; 449 449 450 450 /** Converts a Pthread thread scope to its VPR equivalent. */ 451 VPRThreadScope posixThreadScopeToVPR(const int scope) ;451 VPRThreadScope posixThreadScopeToVPR(const int scope) const; 452 452 453 453 /** Converts a Pthread thread state value to its VPR equivalent. */ 454 VPRThreadState posixThreadStateToVPR(const int state) ;454 VPRThreadState posixThreadStateToVPR(const int state) const; 455 455 456 456 // =========================================================================== juggler/trunk/modules/vapor/vpr/md/WIN32/Thread/ThreadWin32.cpp
r20815 r20816 272 272 } 273 273 274 BaseThread::VPRThreadPriority ThreadWin32::getPrio() 274 BaseThread::VPRThreadPriority ThreadWin32::getPrio() const 275 275 { 276 276 const int priority = GetThreadPriority(mThreadHandle); … … 333 333 } 334 334 335 std::vector<unsigned int> ThreadWin32::getRunOn() 335 std::vector<unsigned int> ThreadWin32::getRunOn() const 336 336 { 337 337 std::vector<unsigned int> cpus; … … 399 399 400 400 int ThreadWin32::vprThreadPriorityToWin32(const VPRThreadPriority priority) 401 const 401 402 { 402 403 int win32_prio(THREAD_PRIORITY_NORMAL); … … 422 423 423 424 BaseThread::VPRThreadPriority 424 ThreadWin32::win32ThreadPriorityToVPR(const int priority) 425 ThreadWin32::win32ThreadPriorityToVPR(const int priority) const 425 426 { 426 427 VPRThreadPriority vpr_prio; juggler/trunk/modules/vapor/vpr/md/WIN32/Thread/ThreadWin32.h
r20815 r20816 148 148 * thread hash. 149 149 */ 150 virtual~ThreadWin32();150 ~ThreadWin32(); 151 151 152 152 /** … … 155 155 * @pre The thread is not already running. The functor is valid. 156 156 */ 157 v irtual void setFunctor(const vpr::thread_func_t& functor);157 void setFunctor(const vpr::thread_func_t& functor); 158 158 159 159 /** … … 175 175 * creation of the thread. 176 176 */ 177 v irtual void start();177 void start(); 178 178 179 179 protected: … … 227 227 * thrown by code executing in this thread and was not caught. 228 228 */ 229 v irtual void join(void** status = NULL);229 void join(void** status = NULL); 230 230 231 231 /** … … 237 237 * 238 238 */ 239 v irtual void resume();239 void resume(); 240 240 241 241 /** … … 243 243 * 244 244 */ 245 v irtual void suspend();245 void suspend(); 246 246 247 247 /** … … 251 251 * thread (and thus cannot have its scheduling queried). 252 252 */ 253 virtual VPRThreadPriority getPrio();253 VPRThreadPriority getPrio() const; 254 254 255 255 /** … … 260 260 * @param prio The new priority for this thread. 261 261 */ 262 v irtual void setPrio(const VPRThreadPriority prio);262 void setPrio(const VPRThreadPriority prio); 263 263 264 264 /** … … 303 303 * be queried. 304 304 */ 305 std::vector<unsigned int> getRunOn() ;305 std::vector<unsigned int> getRunOn() const; 306 306 307 307 /** … … 325 325 * @note This method does nothing. Use kill() instead. 326 326 */ 327 v irtual void kill(const int)327 void kill(const int) 328 328 { 329 329 std::cerr << "vpr::ThreadWin32::kill() is not implemented!" … … 336 336 * @post This thread is cancelled. 337 337 */ 338 v irtual void kill()338 void kill() 339 339 { 340 340 CloseHandle(mThreadHandle); … … 378 378 379 379 /** Converts a VPR thread priority to its Win32 equivalent. */ 380 int vprThreadPriorityToWin32(const VPRThreadPriority priority) ;380 int vprThreadPriorityToWin32(const VPRThreadPriority priority) const; 381 381 382 382 /** Converts a Win32 thread priority to its VPR equivalent. */ 383 VPRThreadPriority win32ThreadPriorityToVPR(const int priority) ;383 VPRThreadPriority win32ThreadPriorityToVPR(const int priority) const; 384 384 385 385 struct staticWrapper
