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

Diff for /pegasus/src/Pegasus/Common/Thread.h between version 1.52 and 1.53

version 1.52, 2005/06/20 13:12:51 version 1.53, 2005/06/24 19:34:23
Line 217 
Line 217 
 }; };
  
  
   enum ThreadStatus {
           PEGASUS_THREAD_OK = 1, /* No problems */
           PEGASUS_THREAD_INSUFFICIENT_RESOURCES, /* Can't allocate a thread. Not enough
                                           memory. Try again later */
           PEGASUS_THREAD_SETUP_FAILURE, /* Could not allocate into the thread specific
                                    data storage. */
           PEGASUS_THREAD_UNAVAILABLE  /* Service is being destroyed and no new threads can
                                  be provided. */
   };
   
 /////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
  
 class PEGASUS_COMMON_LINKAGE Thread class PEGASUS_COMMON_LINKAGE Thread
 { {
   
    public:    public:
   
       Thread( PEGASUS_THREAD_RETURN (PEGASUS_THREAD_CDECL *start )(void *),       Thread( PEGASUS_THREAD_RETURN (PEGASUS_THREAD_CDECL *start )(void *),
               void *parameter, Boolean detached );               void *parameter, Boolean detached );
  
Line 230 
Line 240 
  
       /**       /**
           Start the thread.           Start the thread.
           @return true if the thread is started successfully, false if the            @return PEGASUS_THREAD_OK if the thread is started successfully,
                   resources necessary to start the thread are not currently                    PEGASUS_THREAD_INSUFFICIENT_RESOURCES if the resources necessary
                   available.  ATTN: The result is undefined for any other                    to start the thread are not currently available.
                   type of failure.  (See Bugzilla 972)                    PEGASUS_THREAD_SETUP_FAILURE if the thread could not
                     be create properly - check the 'errno' value for specific operating
                     system return code.
        */        */
       Boolean run();        ThreadStatus run();
  
       // get the user parameter       // get the user parameter
       inline void *get_parm() { return _thread_parm; }       inline void *get_parm() { return _thread_parm; }
Line 505 
Line 517 
         @param blocking A pointer to an optional semaphore which, if         @param blocking A pointer to an optional semaphore which, if
                         specified, is signaled after the thread finishes                         specified, is signaled after the thread finishes
                         executing the work function                         executing the work function
         @return true if the thread is started successfully, false if the          @return PEGASUS_THREAD_OK if the thread is started successfully,
                   PEGASUS_THREAD_INSUFFICIENT_RESOURCES  if the
                 resources necessary to start the thread are not currently                 resources necessary to start the thread are not currently
                 available.  ATTN: The result is undefined for any other                  available.  PEGASUS_THREAD_SETUP_FAILURE if the thread
                 type of thread creation failure.                  could not be setup properly. PEGASUS_THREAD_UNAVAILABLE
                   if this service is shutting down and no more threads can
                   be allocated.
         @exception IPCException         @exception IPCException
      */      */
     Boolean allocate_and_awaken(      ThreadStatus allocate_and_awaken(
         void* parm,         void* parm,
         PEGASUS_THREAD_RETURN (PEGASUS_THREAD_CDECL* work)(void *),         PEGASUS_THREAD_RETURN (PEGASUS_THREAD_CDECL* work)(void *),
         Semaphore* blocking = 0);         Semaphore* blocking = 0);


Legend:
Removed from v.1.52  
changed lines
  Added in v.1.53

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2