Ejemplo n.º 1
0
LOW_thread_Factory::cancelAttrib_t LOW_thread_thread_POSIX::getCancelAttrib() const 
{
  if ( ! getIsStarted() || getIsTerminated() )
    throw thread_thread_error( "thread not running", __FILE__, __LINE__);
  
  return cancelAttrib;
}
Ejemplo n.º 2
0
bool CTicTacToe::isStarted()
{

    if (getIsStarted() == true) {
        return true;
    }

    return false;
}
Ejemplo n.º 3
0
int LOW_thread_thread_POSIX::getReturnValue() const 
{
  if ( ! getIsStarted() )
    throw thread_thread_error( "thread was not started", __FILE__, __LINE__);

  if ( ! getIsTerminated() )
    throw thread_thread_error( "thread not terminated yet", __FILE__, __LINE__);

  return returnValue;
}
Ejemplo n.º 4
0
void LOW_thread_thread_POSIX::create()
{
  if ( getIsStarted() )
    throw thread_thread_error( "thread already started", __FILE__, __LINE__);

  LOW_thread_mutex::mutexLock theLock = LOW_thread_mutex::mutexLock( *createSyncMutex); // lock until return

  if ( int errVal=pthread_create( &threadID, &initAttr, threadRunner, this) != 0 )
    throw thread_thread_error( errVal, "pthread_create() failed", __FILE__, __LINE__);

  isStarted     = true;
}