(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.5 and 1.14.2.3

version 1.5, 2006/08/21 16:38:34 version 1.14.2.3, 2008/07/17 19:46:18
Line 29 
Line 29 
 // //
 //============================================================================== //==============================================================================
 // //
 // Author: Mike Brasher (m.brasher@inovadevelopment.com)  
 //  
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #ifndef Pegasus_Threads_h #ifndef Pegasus_Threads_h
Line 45 
Line 43 
 // ATTN: can we consolidate these someplace? // ATTN: can we consolidate these someplace?
  
 #if defined(PEGASUS_HAVE_PTHREADS) #if defined(PEGASUS_HAVE_PTHREADS)
 # if defined(PEGASUS_PLATFORM_OS400_ISERIES_IBM)  
 # define _MULTI_THREADED // Is this really necessary?  
 # endif  
 # include <pthread.h> # include <pthread.h>
 # include <errno.h> # include <errno.h>
 # include <sys/time.h> # include <sys/time.h>
Line 66 
Line 61 
 // //
 //============================================================================== //==============================================================================
  
 #if defined(PEGASUS_PLATFORM_WIN32_IX86_MSVC)  #if defined(PEGASUS_OS_TYPE_WINDOWS)
 # define PEGASUS_THREAD_CDECL __stdcall # define PEGASUS_THREAD_CDECL __stdcall
 #else #else
 # define PEGASUS_THREAD_CDECL /* empty */ # define PEGASUS_THREAD_CDECL /* empty */
Line 160 
Line 155 
 { {
 public: public:
  
     enum Type { DETACHED, JOINABLE };      enum Type { THREADS_DETACHED, THREADS_JOINABLE };
  
     static int create(     static int create(
         ThreadType& thread,         ThreadType& thread,
Line 206 
Line 201 
  
 inline void Threads::exit(ThreadReturnType rc) inline void Threads::exit(ThreadReturnType rc)
 { {
       // NOTE: pthread_exit exhibits unusual behavior on RHEL 3 U2, as
       // documented in Bugzilla 3836.  Where feasible, it may be advantageous
       // to avoid using this function.
     pthread_exit(rc);     pthread_exit(rc);
 } }
  
Line 217 
Line 215 
 inline void Threads::yield() inline void Threads::yield()
 { {
 #if defined(PEGASUS_PLATFORM_AIX_RS_IBMCXX) || \ #if defined(PEGASUS_PLATFORM_AIX_RS_IBMCXX) || \
       defined(PEGASUS_PLATFORM_PASE_ISERIES_IBMCXX) || \
     defined(PEGASUS_PLATFORM_HPUX_ACC) || \     defined(PEGASUS_PLATFORM_HPUX_ACC) || \
     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)      defined(PEGASUS_OS_ZOS) || \
       defined(PEGASUS_OS_VXWORKS) || \
       defined(PEGASUS_OS_DARWIN) || \
       defined(PEGASUS_OS_SOLARIS)
     sched_yield();     sched_yield();
 #else #else
     pthread_yield();     pthread_yield();
Line 253 
Line 254 
         s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7]);         s[0], s[1], s[2], s[3], s[4], s[5], s[6], s[7]);
 #else #else
     sprintf(tid.buffer, "%" PEGASUS_64BIT_CONVERSION_WIDTH "u",     sprintf(tid.buffer, "%" PEGASUS_64BIT_CONVERSION_WIDTH "u",
         Uint64((unsigned long)x.thread));          Uint64(x.thread));
 #endif #endif
  
     return tid;     return tid;
Line 263 
Line 264 
 { {
 #if defined(PEGASUS_PLATFORM_ZOS_ZSERIES_IBM) #if defined(PEGASUS_PLATFORM_ZOS_ZSERIES_IBM)
     Uint64 tmp;     Uint64 tmp;
     memcpy(&tmp, x._thread.__, sizeof(Uint64));      memcpy(&tmp, x.thread.__, sizeof(Uint64));
     return tmp == 0;     return tmp == 0;
 #else #else
     return x.thread == 0;     return x.thread == 0;


Legend:
Removed from v.1.5  
changed lines
  Added in v.1.14.2.3

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2