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

Diff for /pegasus/src/Pegasus/Common/Threads.cpp between version 1.10 and 1.10.8.1

version 1.10, 2007/06/05 09:44:14 version 1.10.8.1, 2007/11/09 18:59:30
Line 96 
Line 96 
  
 //============================================================================== //==============================================================================
 // //
 // Thread id TSD:  
 //  
 //==============================================================================  
   
 static Once _once = PEGASUS_ONCE_INITIALIZER;  
 static TSDKeyType _key;  
   
 static void _create_key()  
 {  
     TSDKey::create(&_key);  
 }  
   
 static inline void _set_id_tsd(Uint32 id)  
 {  
     once(&_once, _create_key);  
     TSDKey::set_thread_specific(_key, (void*)(long)id);  
 }  
   
 static inline Uint32 _get_id_tsd()  
 {  
     once(&_once, _create_key);  
     void* ptr = TSDKey::get_thread_specific(_key);  
   
     if (!ptr)  
     {  
         // Main thread's id is 1!  
         return 1;  
     }  
   
     return (Uint32)(long)ptr;  
 }  
   
 //==============================================================================  
 //  
 // _get_stack_multiplier() // _get_stack_multiplier()
 // //
 //============================================================================== //==============================================================================
Line 175 
Line 141 
     }     }
  
     return _multiplier;     return _multiplier;
 #else  #elif defined(PEGASUS_PLATFORM_HPUX_PARISC_ACC)
     return 2;     return 2;
   #else
       return 1;
 #endif #endif
 } }
  
Line 213 
Line 181 
  
     // Stack size:     // Stack size:
  
 #if defined(PEGASUS_PLATFORM_HPUX_PARISC_ACC) || defined(PEGASUS_OS_VMS)      int multiplier = _get_stack_multiplier();
   
       if (multiplier != 1)
     {     {
         size_t stacksize;         size_t stacksize;
  
         if (pthread_attr_getstacksize(&attr, &stacksize) == 0)         if (pthread_attr_getstacksize(&attr, &stacksize) == 0)
         {         {
             int m = _get_stack_multiplier();              int rc = pthread_attr_setstacksize(&attr, stacksize * multiplier);
             int rc = pthread_attr_setstacksize(&attr, stacksize * m);  
             PEGASUS_ASSERT(rc == 0);             PEGASUS_ASSERT(rc == 0);
         }         }
     }     }
 #endif  
  
     // Scheduling policy:     // Scheduling policy:
  


Legend:
Removed from v.1.10  
changed lines
  Added in v.1.10.8.1

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2