libcsdbg  1.28
C++ exception (and generic) stack trace debug library
process & csdbg::process::operator= ( const process rval)
virtual

Assignment operator.

Parameters
[in]rvalthe assigned object
Returns
*this
Exceptions
std::bad_alloc

Definition at line 173 of file process.cpp.

References csdbg::util::lock(), m_modules, m_pid, m_symcache, m_threads, unlikely, and csdbg::util::unlock().

174 {
175  if ( unlikely(this == &rval) )
176  return *this;
177 
178  util::lock();
179  try {
180  m_pid = rval.m_pid;
181  *m_threads = *rval.m_threads;
182  *m_modules = *rval.m_modules;
183  *m_symcache = *rval.m_symcache;
184 
185  util::unlock();
186  return *this;
187  }
188 
189  catch (...) {
190  util::unlock();
191  throw;
192  }
193 }
chain< thread > * m_threads
Instrumented thread list.
Definition: process.hpp:37
chain< symtab > * m_modules
Symbol table list.
Definition: process.hpp:39
static void lock()
Lock the global access mutex.
Definition: util.cpp:397
static void unlock()
Unlock the global access mutex.
Definition: util.cpp:406
chain< symbol > * m_symcache
Lookup cache.
Definition: process.hpp:41
pid_t m_pid
Process ID.
Definition: process.hpp:35
#define unlikely(expr)
Offer a hint (negative) to the pipeline branch predictor.
Definition: config.hpp:349

+ Here is the call graph for this function: