(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.8 and 1.15.2.4.2.1

version 1.8, 2006/09/19 16:45:54 version 1.15.2.4.2.1, 2008/07/01 15:18:02
Line 29 
Line 29 
 // //
 //============================================================================== //==============================================================================
 // //
 // Author: Mike Brasher (m.brasher@inovadevelopment.com)  
 //  
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #ifndef Pegasus_Threads_h #ifndef Pegasus_Threads_h
Line 44 
Line 42 
  
 // ATTN: can we consolidate these someplace? // ATTN: can we consolidate these someplace?
  
 #if defined(PEGASUS_HAVE_PTHREADS)  #ifdef PEGASUS_OS_ZOS
 # if defined(PEGASUS_PLATFORM_OS400_ISERIES_IBM)  # include <sched.h>
 # define _MULTI_THREADED // Is this really necessary?  
 # endif # endif
   #if defined(PEGASUS_HAVE_PTHREADS)
 # include <pthread.h> # include <pthread.h>
 # include <errno.h> # include <errno.h>
 # include <sys/time.h> # include <sys/time.h>
Line 58 
Line 56 
 # error "<Pegasus/Common/Threads.h>: not implemented" # error "<Pegasus/Common/Threads.h>: not implemented"
 #endif #endif
  
   #if defined(PEGASUS_OS_SOLARIS)
   # include <string.h>
   # include <stdio.h>
   #endif
   
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
 //============================================================================== //==============================================================================
Line 66 
Line 69 
 // //
 //============================================================================== //==============================================================================
  
 #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 206 
Line 209 
  
 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 216 
Line 222 
  
 inline void Threads::yield() inline void Threads::yield()
 { {
 #if defined(PEGASUS_PLATFORM_AIX_RS_IBMCXX) || \  #ifdef PEGASUS_OS_LINUX
     defined(PEGASUS_PLATFORM_HPUX_ACC) || \  
     defined(PEGASUS_PLATFORM_OS400_ISERIES_IBM) || \  
     defined(PEGASUS_PLATFORM_TRU64_ALPHA_DECCXX) || \  
     defined(PEGASUS_OS_VMS) || \  
     defined(PEGASUS_OS_ZOS) || \  
     defined(PEGASUS_PLATFORM_DARWIN_PPC_GNU)  
     sched_yield();  
 #else  
     pthread_yield();     pthread_yield();
   #else
       sched_yield();
 #endif #endif
 } }
  
Line 246 
Line 246 
  
 inline ThreadId Threads::id(const ThreadType& x) inline ThreadId Threads::id(const ThreadType& x)
 { {
     ThreadId tid;      ThreadId tid = { { 0 } };
  
 #if defined(PEGASUS_PLATFORM_ZOS_ZSERIES_IBM) #if defined(PEGASUS_PLATFORM_ZOS_ZSERIES_IBM)
     const char* s = x.thread.__;     const char* s = x.thread.__;


Legend:
Removed from v.1.8  
changed lines
  Added in v.1.15.2.4.2.1

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2