(file) Return to Threads.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/Threads.h between version 1.20 and 1.20.8.1

version 1.20, 2008/12/02 09:00:53 version 1.20.8.1, 2013/06/03 22:35:14
Line 175 
Line 175 
  
     static void exit(ThreadReturnType rc);     static void exit(ThreadReturnType rc);
  
     static void cancel(ThreadType th, ThreadReturnType rc);  
   
     static void yield();     static void yield();
  
     static void sleep(int msec);     static void sleep(int msec);
  
     static void cleanup_push(void (*start)(void*), void* arg);  
   
     static void cleanup_pop(int execute);  
   
     static ThreadId id(const ThreadType& x = Threads::self());     static ThreadId id(const ThreadType& x = Threads::self());
  
     static bool null(const ThreadType& x = Threads::self());     static bool null(const ThreadType& x = Threads::self());
Line 213 
Line 207 
     pthread_exit(rc);     pthread_exit(rc);
 } }
  
 inline void Threads::cancel(ThreadType th, ThreadReturnType rc)  
 {  
     pthread_cancel(th.thread);  
 }  
   
 inline void Threads::yield() inline void Threads::yield()
 { {
 #ifdef PEGASUS_OS_LINUX #ifdef PEGASUS_OS_LINUX
Line 227 
Line 216 
 #endif #endif
 } }
  
 inline void Threads::cleanup_push(void (*func)(void*), void* arg)  
 {  
     // ATTN: it is doubtful whether cleanup handlers ever really worked.  
     //       They are only used in two places and not used in many other  
     //       places where mutexes are obtained. Further, they are only  
     //       implemented correctly on one or two platforms. For now, we  
     //       will defer their implementation until we can find a way to  
     //       implement them on all platforms (using thread local storage).  
 }  
   
 inline void Threads::cleanup_pop(int execute)  
 {  
     // ATTN: not implemented.  
 }  
   
 inline ThreadId Threads::id(const ThreadType& x) inline ThreadId Threads::id(const ThreadType& x)
 { {
     ThreadId tid = { { 0 } };     ThreadId tid = { { 0 } };
Line 301 
Line 275 
     _endthreadex(rc);     _endthreadex(rc);
 } }
  
 inline void Threads::cancel(ThreadType th, ThreadReturnType rc)  
 {  
     TerminateThread(th.handle, rc);  
 }  
   
 inline void Threads::yield() inline void Threads::yield()
 { {
     Sleep(0);     Sleep(0);
 } }
  
 inline void Threads::cleanup_push(void (*func)(void*), void* arg)  
 {  
     // ATTN: Not implemented on Windows.  
 }  
   
 inline void Threads::cleanup_pop(int execute)  
 {  
     // ATTN: Not implemented on Windows.  
 }  
   
 inline ThreadId Threads::id(const ThreadType& x) inline ThreadId Threads::id(const ThreadType& x)
 { {
     ThreadId tmp;     ThreadId tmp;


Legend:
Removed from v.1.20  
changed lines
  Added in v.1.20.8.1

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2