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; }
bool CTicTacToe::isStarted() { if (getIsStarted() == true) { return true; } return false; }
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; }
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; }