예제 #1
0
void SlaveConfig::unmapData()
{
    LBASSERT( _objects )
    unmapObject( _objects );
    delete _objects;
    _objects = 0;
}
예제 #2
0
파일: config.cpp 프로젝트: yarda/Equalizer
void Config::releaseObject( co::Object* object )
{
    if( !object->isAttached( ))
        return;
    if( object->isMaster( ))
        deregisterObject( object );
    else
        unmapObject( object );
}
예제 #3
0
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 );
    }
}
예제 #4
0
bool Config::mapData( const eq::uint128_t& initDataID )
{
    if( !_initData.isAttached( ))
    {
        LBCHECK( mapObject( &_initData, initDataID ) );
        unmapObject( &_initData );
    }
    else
    {
        LBASSERT( _initData.getID() == initDataID );
    }
    return true;
}
예제 #5
0
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;
  }
예제 #7
0
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;
}
예제 #8
0
파일: config.cpp 프로젝트: yarda/Equalizer
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;
}