LLThread Class Reference

#include <llthread.h>

Inheritance diagram for LLThread:

Inheritance graph
[legend]
Collaboration diagram for LLThread:

Collaboration graph
[legend]

List of all members.

Public Types

enum  e_thread_status { STOPPED = 0, RUNNING = 1, QUITTING = 2 }
typedef enum
LLThread::e_thread_status 
EThreadStatus

Public Member Functions

 LLThread (const std::string &name, apr_pool_t *poolp=NULL)
virtual ~LLThread ()
virtual void shutdown ()
bool isQuitting () const
bool isStopped () const
void pause ()
void unpause ()
bool isPaused ()
void wake ()
void wakeLocked ()
void checkPause ()
void start (void)
apr_pool_tgetAPRPool ()

Static Public Member Functions

static U32 currentID ()
static void yield ()

Protected Member Functions

void setQuitting ()
virtual void run (void)=0
virtual bool runCondition (void)
void lockData ()
void unlockData ()
bool shouldSleep (void)

Protected Attributes

std::string mName
LLConditionmRunCondition
apr_thread_t * mAPRThreadp
apr_pool_tmAPRPoolp
BOOL mIsLocalPool
EThreadStatus mStatus

Static Private Member Functions

static void *APR_THREAD_FUNC staticRun (apr_thread_t *apr_threadp, void *datap)

Private Attributes

BOOL mPaused


Detailed Description

Definition at line 45 of file llthread.h.


Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
STOPPED 
RUNNING 
QUITTING 

Definition at line 48 of file llthread.h.


Constructor & Destructor Documentation

LLThread::LLThread ( const std::string &  name,
apr_pool_t poolp = NULL 
)

Definition at line 86 of file llthread.cpp.

References FALSE, mAPRPoolp, mIsLocalPool, mRunCondition, NULL, and TRUE.

LLThread::~LLThread (  )  [virtual]

Definition at line 107 of file llthread.cpp.

References shutdown().

Here is the call graph for this function:


Member Function Documentation

void LLThread::shutdown (  )  [virtual]

Reimplemented in LLQueuedThread.

Definition at line 112 of file llthread.cpp.

References isStopped(), llendl, llinfos, llwarns, mAPRPoolp, mAPRThreadp, mIsLocalPool, mName, mRunCondition, ms_sleep(), mStatus, NULL, S32, setQuitting(), and yield().

Referenced by ~LLThread().

Here is the call graph for this function:

Here is the caller graph for this function:

bool LLThread::isQuitting (  )  const [inline]

Definition at line 59 of file llthread.h.

References mStatus, and QUITTING.

Referenced by LLQueuedThread::processNextRequest(), and LLQueuedThread::run().

Here is the caller graph for this function:

bool LLThread::isStopped (  )  const [inline]

Definition at line 60 of file llthread.h.

References mStatus, and STOPPED.

Referenced by isPaused(), shutdown(), and LLQueuedThread::shutdown().

Here is the caller graph for this function:

U32 LLThread::currentID (  )  [static]

Definition at line 231 of file llthread.cpp.

Referenced by LLCurl::ssl_thread_id().

Here is the caller graph for this function:

void LLThread::yield (  )  [static]

Definition at line 237 of file llthread.cpp.

Referenced by shutdown(), LLQueuedThread::shutdown(), LLQueuedThread::waitForResult(), LLQueuedThread::waitOnPending(), and LLWorkerClass::yield().

Here is the caller graph for this function:

void LLThread::pause (  ) 

Definition at line 174 of file llthread.cpp.

References mPaused.

Referenced by LLAppViewer::mainLoop(), LLViewerWindow::stopGL(), and LLQueuedThread::waitForResult().

Here is the caller graph for this function:

void LLThread::unpause (  ) 

Definition at line 183 of file llthread.cpp.

References mPaused, and wake().

Referenced by LLQueuedThread::shutdown(), and LLQueuedThread::updateQueue().

Here is the call graph for this function:

Here is the caller graph for this function:

bool LLThread::isPaused (  )  [inline]

Definition at line 70 of file llthread.h.

References isStopped(), mPaused, and TRUE.

Referenced by LLQueuedThread::incQueue(), LLVFile::setMaxSize(), shouldSleep(), LLVFile::waitForLock(), and LLQueuedThread::waitForResult().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLThread::wake (  ) 

Definition at line 246 of file llthread.cpp.

References LLMutex::lock(), mRunCondition, shouldSleep(), LLCondition::signal(), and LLMutex::unlock().

Referenced by LLQueuedThread::incQueue(), setQuitting(), and unpause().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLThread::wakeLocked (  ) 

Definition at line 256 of file llthread.cpp.

References mRunCondition, shouldSleep(), and LLCondition::signal().

Here is the call graph for this function:

void LLThread::checkPause (  ) 

Definition at line 203 of file llthread.cpp.

References LLMutex::lock(), mRunCondition, shouldSleep(), LLMutex::unlock(), and LLCondition::wait().

Referenced by LLQueuedThread::run(), and LLWorkerClass::yield().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLThread::start ( void   ) 

Definition at line 161 of file llthread.cpp.

References mAPRPoolp, mAPRThreadp, NULL, and staticRun().

Referenced by LLWatchdog::init(), LLQueuedThread::LLQueuedThread(), and LLApp::setupErrorHandling().

Here is the call graph for this function:

Here is the caller graph for this function:

apr_pool_t* LLThread::getAPRPool (  )  [inline]

Definition at line 84 of file llthread.h.

References mAPRPoolp.

Referenced by LLWorkerThread::LLWorkerThread().

Here is the caller graph for this function:

void *APR_THREAD_FUNC LLThread::staticRun ( apr_thread_t *  apr_threadp,
void *  datap 
) [static, private]

Definition at line 67 of file llthread.cpp.

References llendl, llinfos, mName, mStatus, NULL, run(), RUNNING, and STOPPED.

Referenced by start().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLThread::setQuitting (  )  [protected]

Definition at line 219 of file llthread.cpp.

References LLMutex::lock(), mRunCondition, mStatus, QUITTING, RUNNING, LLMutex::unlock(), and wake().

Referenced by LLVFSThread::cleanupClass(), LLLFSThread::cleanupClass(), shutdown(), and LLQueuedThread::shutdown().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void LLThread::run ( void   )  [protected, pure virtual]

Implemented in LLErrorThread, LLQueuedThread, and LLWatchdogTimerThread.

Referenced by staticRun().

Here is the caller graph for this function:

bool LLThread::runCondition ( void   )  [protected, virtual]

Reimplemented in LLQueuedThread.

Definition at line 194 of file llthread.cpp.

Referenced by shouldSleep().

Here is the caller graph for this function:

void LLThread::lockData (  )  [inline, protected]

void LLThread::unlockData (  )  [inline, protected]

bool LLThread::shouldSleep ( void   )  [inline, protected]

Definition at line 116 of file llthread.h.

References isPaused(), mStatus, runCondition(), and RUNNING.

Referenced by checkPause(), wake(), and wakeLocked().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 87 of file llthread.h.

Referenced by isPaused(), pause(), and unpause().

std::string LLThread::mName [protected]

Definition at line 94 of file llthread.h.

Referenced by checkPause(), LLThread(), lockData(), setQuitting(), shutdown(), unlockData(), wake(), and wakeLocked().

apr_thread_t* LLThread::mAPRThreadp [protected]

Definition at line 96 of file llthread.h.

Referenced by shutdown(), and start().

Definition at line 98 of file llthread.h.

Referenced by LLThread(), and shutdown().


The documentation for this class was generated from the following files:

Generated on Fri May 16 09:15:32 2008 for SecondLife by  doxygen 1.5.5