(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.3 and 1.4

version 1.3, 2006/08/15 17:17:30 version 1.4, 2006/08/21 15:31:03
Line 202 
Line 202 
 // //
 //============================================================================== //==============================================================================
  
 static IDFactory _thread_ids(2); /* 1 reserved for main thread */  
   
 #if defined(PEGASUS_HAVE_PTHREADS) #if defined(PEGASUS_HAVE_PTHREADS)
  
 int Threads::create( int Threads::create(
Line 257 
Line 255 
  
     // Create thread:     // Create thread:
  
     pthread_t thr;      int rc = pthread_create(&thread.thread, &attr, start, arg);
     int rc = pthread_create(&thr, &attr, start, arg);  
  
     if (rc != 0)     if (rc != 0)
     {     {
Line 266 
Line 263 
         return rc;         return rc;
     }     }
  
     // Assign thread id (and put into thread specific storage).  
   
     Uint32 id = _thread_ids.getID();  
     _set_id_tsd(id);  
   
     // Destroy attributes now.     // Destroy attributes now.
  
     pthread_attr_destroy(&attr);     pthread_attr_destroy(&attr);
  
     // Return:     // Return:
  
     thread = ThreadType(thr, id);  
     return 0;     return 0;
 } }
  
 ThreadType Threads::self() ThreadType Threads::self()
 { {
     return ThreadType(pthread_self(), _get_id_tsd());      ThreadType tt;
       tt.thread = pthread_self();
       return tt;
 } }
  
 #endif /* PEGASUS_HAVE_PTHREADS */ #endif /* PEGASUS_HAVE_PTHREADS */


Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2