Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

PThread * PThread::Current (  ) [static, inherited]

Get the currently running thread object instance. It is possible, even likely, that the smae code may be executed in the context of differenct threads. Under some circumstances it may be necessary to know what the current codes thread is and this static function provides that information.

Returns:
pointer to current thread.

Reimplemented in PHTTPServiceProcess, PProcess, PServiceProcess, Audio, and Threadex.

Definition at line 1489 of file win32.cxx.

Referenced by PTrace::Begin(), PTrace::Block::Block(), PVideoInputDevice_1394DC::GetFrameData(), PVideoInputDevice_1394AVC::GetFrameData(), PThread::IsTerminated(), LauncherThread::Main(), PSystemLog::Output(), PThread::PThread(), PChannel::SendCommandString(), PThread::SetAutoDelete(), PThread::Terminate(), PServiceProcess::Terminate(), PThread::WaitForTermination(), and PTrace::Block::~Block().

{
  PProcess & process = PProcess::Current();
  process.activeThreadMutex.Wait();
  PThread * thread = process.activeThreads.GetAt(GetCurrentThreadId());
  process.activeThreadMutex.Signal();
  return thread;
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index