(file) Return to ThreadUnix_inline.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common / Attic

Diff for /pegasus/src/Pegasus/Common/Attic/ThreadUnix_inline.h between version 1.11 and 1.12

version 1.11, 2003/06/14 19:25:38 version 1.12, 2003/08/06 13:58:15
Line 31 
Line 31 
 #ifndef ThreadUnix_inline_h #ifndef ThreadUnix_inline_h
 #define ThreadUnix_inline_h #define ThreadUnix_inline_h
  
   #ifdef PEGASUS_PLATFORM_SOLARIS_SPARC_CC
   // _start wrapper to overcome "C" "C++" binding warnings
   // (code "borrowed" from ThreadzOS_inline.h)
   // Actually the Solaris compiler doesn't need this as "C" "C++"
   // bindings are the same, but it moans like hell about it !!
   // (Its correct to moan, but its a pain all the same).
   
   
   typedef struct {
       void * (PEGASUS_THREAD_CDECL * _start)(void *);
       void * realParm;
   } zosParmDef;
   
   extern "C" { void * _linkage(void * zosParm); }
   
   inline void Thread::run()
   {
       zosParmDef * zosParm = (zosParmDef *)malloc(sizeof(zosParmDef));
       zosParm->_start = _start;
       zosParm->realParm = (void *) this;
       if (_is_detached)
       {
           pthread_attr_setdetachstate(&_handle.thatt, PTHREAD_CREATE_DETACHED);
       }
       pthread_attr_setschedpolicy(&_handle.thatt, SCHED_RR);
       pthread_create((pthread_t *)&_handle.thid,
                       &_handle.thatt, &_linkage, zosParm);
   }
   #else // PEGASUS_PLATFORM_SOLARIS_SPARC_CC
 inline void Thread::run() inline void Thread::run()
 { {
     if (_is_detached)     if (_is_detached)
Line 41 
Line 70 
 #endif #endif
     pthread_create((pthread_t *)&_handle.thid, &_handle.thatt, _start, this);     pthread_create((pthread_t *)&_handle.thid, &_handle.thatt, _start, this);
 } }
   #endif // PEGASUS_PLATFORM_SOLARIS_SPARC_CC
  
  
 inline void Thread::cancel() inline void Thread::cancel()


Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2