void SlaveConfig::unmapData() { LBASSERT( _objects ) unmapObject( _objects ); delete _objects; _objects = 0; }
void Config::releaseObject( co::Object* object ) { if( !object->isAttached( )) return; if( object->isMaster( )) deregisterObject( object ); else unmapObject( object ); }
void Config::mapData(const uint32_t initDataID) { if( _initData.getID() == EQ_ID_INVALID ) { EQCHECK( mapObject( &_initData, initDataID )); unmapObject( &_initData ); // data was retrieved, unmap immediately } else { // appNode, _initData is registered already EQASSERT( _initData.getID() == initDataID ); } }
bool Config::mapData( const eq::uint128_t& initDataID ) { if( !_initData.isAttached( )) { LBCHECK( mapObject( &_initData, initDataID ) ); unmapObject( &_initData ); } else { LBASSERT( _initData.getID() == initDataID ); } return true; }
bool Config::mapData( const eq::uint128_t& initDataID ) { if( !_initData.isAttached() ) { if( !mapObject( &_initData, initDataID )) return false; unmapObject( &_initData ); // data was retrieved, unmap immediately } else // appNode, _initData is registered already { EQASSERT( _initData.getID() == initDataID ); } return true; }
/** Set object state. @param state_new new object state @return old object state */ state_t setState(state_t state_new) { state_t state_old = getState(); if(state_new == state_old) return state_old; switch(state_old) { case STATE_UNUSED: { registerObject(); setState(state_new); break; } case STATE_GRAPHICS_BOUND: { unbindObject(); setState(state_new); break; } case STATE_INACTIVE: { switch(state_new) { case STATE_UNUSED: unregisterObject(); break; case STATE_GRAPHICS_BOUND: bindObject(); break; case STATE_CUDA_MAPPED: mapObject(); break; case STATE_INACTIVE: // avoid warning message break; } break; } case STATE_CUDA_MAPPED: { unmapObject(); setState(state_new); } } return state_old; }
bool Config::loadData( const eq::uint128_t& initDataID ) { if( !_initData.isAttached( )) { const uint32_t request = mapObjectNB( &_initData, initDataID, co::VERSION_OLDEST, getApplicationNode( )); if( !mapObjectSync( request )) return false; unmapObject( &_initData ); // data was retrieved, unmap immediately } else // appNode, _initData is registered already { LBASSERT( _initData.getID() == initDataID ); } return true; }
bool Config::_cmdDestroyNode( co::Command& command ) { const ConfigDestroyNodePacket* packet = command.get<ConfigDestroyNodePacket>(); EQVERB << "Handle destroy node " << packet << std::endl; Node* node = _findNode( packet->nodeID ); EQASSERT( node ); if( !node ) return true; NodeConfigExitReplyPacket reply( packet->nodeID, node->isStopped( )); EQASSERT( node->getPipes().empty( )); unmapObject( node ); Global::getNodeFactory()->releaseNode( node ); getServer()->send( reply ); return true; }