(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.1.2.5 and 1.1.2.10

version 1.1.2.5, 2006/07/28 20:49:59 version 1.1.2.10, 2006/08/02 07:26:35
Line 72 
Line 72 
  
 //============================================================================== //==============================================================================
 // //
 // Thread-related type definitions  // ThreadType
 // //
 //============================================================================== //==============================================================================
  
 #if defined(PEGASUS_HAVE_PTHREADS) #if defined(PEGASUS_HAVE_PTHREADS)
   
 struct ThreadType struct ThreadType
 { {
 public: public:
Line 105 
Line 104 
         return *this;         return *this;
     }     }
  
     pthread_t handle() const      pthread_t tt_handle() const
     {     {
         return _thread;         return _thread;
     }     }
Line 117 
Line 116 
  
 private: private:
     pthread_t _thread;     pthread_t _thread;
       // An id of zero indicates a null object. 1 indicates the main thread.
     // And id of zero indicates a null object. 1 indicates the main thread.  
     Uint32 _id;     Uint32 _id;
     friend class Threads;     friend class Threads;
 }; };
   #endif /* PEGASUS_HAVE_PTHREADS */
 typedef void* ThreadReturnType;  
 #endif  
  
 #if defined(PEGASUS_HAVE_WINDOWS_THREADS) #if defined(PEGASUS_HAVE_WINDOWS_THREADS)
 struct ThreadType struct ThreadType
 { {
       ThreadType() : handle(NULL) { }
     HANDLE handle;     HANDLE handle;
 }; };
   #endif /* PEGASUS_HAVE_WINDOWS_THREADS */
   
   //==============================================================================
   //
   // ThreadReturnType
   //
   //==============================================================================
   
   #if defined(PEGASUS_HAVE_PTHREADS)
   typedef void* ThreadReturnType;
   #endif
   
   #if defined(PEGASUS_HAVE_WINDOWS_THREADS)
 typedef unsigned ThreadReturnType; typedef unsigned ThreadReturnType;
 #endif #endif
  
Line 201 
Line 211 
  
 inline bool Threads::equal(ThreadType x, ThreadType y) inline bool Threads::equal(ThreadType x, ThreadType y)
 { {
     return pthread_equal(x.thread(), y.thread());      return pthread_equal(x.tt_handle(), y.tt_handle());
 } }
  
 inline void Threads::exit(ThreadReturnType rc) inline void Threads::exit(ThreadReturnType rc)
Line 211 
Line 221 
  
 inline void Threads::cancel(ThreadType th, ThreadReturnType rc) inline void Threads::cancel(ThreadType th, ThreadReturnType rc)
 { {
     pthread_cancel(th.thread());      pthread_cancel(th.tt_handle());
 } }
  
 inline void Threads::yield() inline void Threads::yield()
Line 220 
Line 230 
     defined(PEGASUS_PLATFORM_HPUX_ACC) || \     defined(PEGASUS_PLATFORM_HPUX_ACC) || \
     defined(PEGASUS_PLATFORM_OS400_ISERIES_IBM) || \     defined(PEGASUS_PLATFORM_OS400_ISERIES_IBM) || \
     defined(PEGASUS_PLATFORM_TRU64_ALPHA_DECCXX) || \     defined(PEGASUS_PLATFORM_TRU64_ALPHA_DECCXX) || \
     defined(PEGASUS_OS_VMS)      defined(PEGASUS_OS_VMS) || \
       defined(PEGASUS_OS_ZOS)
     sched_yield();     sched_yield();
 #else #else
     pthread_yield();     pthread_yield();


Legend:
Removed from v.1.1.2.5  
changed lines
  Added in v.1.1.2.10

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2