//************************************************************************** void iwindow_t::print( void ) { DEBUG_OUT("|"); for (uint32 i = 0; i < m_rob_size; i++) { if (m_window[i] != NULL) { DEBUG_OUT("X|"); } else { DEBUG_OUT(" |"); } } DEBUG_OUT("\n"); DEBUG_OUT("|"); for (uint32 i = 0; i < m_rob_size; i++) { int overlap = 0; char output = ' '; if ( i == m_last_retired ) { overlap++; output = 'R'; } if ( i == m_last_scheduled ) { overlap++; output = 'E'; } if ( i == m_last_decoded ) { overlap++; output = 'D'; } if ( i == m_last_fetched ) { overlap++; output = 'F'; } if (overlap > 1) { DEBUG_OUT("%.1d|", overlap); } else { DEBUG_OUT("%c|", output); } } DEBUG_OUT("\n"); }
STATUS fmodCreateSoundFromFile( FMOD::System* system, FMOD::Sound** sound, const char* file ) { FMOD_RESULT result; FMOD_CREATESOUNDEXINFO exInfo; void* buff; int length; //------------------------------------------------ if( system == 0 ) { DEBUG_OUT( "system == NULL" ); return PARAM_NULL_PASSED; } if( file == 0 ) { DEBUG_OUT( "file == NULL" ); return PARAM_NULL_PASSED; } if( !LoadFileIntoMemory( file, &buff, &length ) ) { DEBUG_OUT( "LoadFileIntoMemory failed!" ); DEBUG_OUT( file ); return SOUND_FROM_FILE_FAILED; } memset( &exInfo, 0, sizeof( FMOD_CREATESOUNDEXINFO ) ); exInfo.cbsize = sizeof( FMOD_CREATESOUNDEXINFO ); exInfo.length = length; result = system->createSound( ( const char* )buff, FMOD_HARDWARE | FMOD_OPENMEMORY, &exInfo, sound ); if( result != FMOD_OK || sound == 0 ) { if( result != FMOD_OK ) DEBUG_OUT( FMOD_ErrorString( result ) ); else DEBUG_OUT( "Sound object creation failed!" ); free( buff ); return SOUND_CREATION_FAILED; } free( buff ); return OK; }
/** * the static callback called by the C-level routines in uv. it's main job is to call a C++ level callback to do the work with higher layers * * from uv.h * typedef void (*uv_connect_cb)(uv_connect_t* req, int status); */ void UVEventLoop::OnConnect(uv_connect_t *req, int status) { DEBUG_OUT("OnConnect() ... " << status); UVReader* ocCBp=nullptr; if (req) { ocCBp=static_cast<UVReader*>(req->data); } if (ocCBp) { ocCBp->client->socket->data = ocCBp; if (status >= 0) { status = uv_read_start((uv_stream_t*)ocCBp->client->socket, AllocBuffer, OnRead); } if (ocCBp->connectCB) { (*ocCBp->connectCB)(req, status); } // ocCBp->client->socket->data = ocCBp->readerCB; // ocCBp->disposed = true; } }
//*************************************************************************************************** bool writebuffer_t::checkOutstandingRequests(pa_t physical_address){ if(m_use_write_buffer){ #ifdef DEBUG_WRITE_BUFFER DEBUG_OUT("\n***WriteBuffer: checkOutsandingRequests BEGIN\n"); #endif pa_t lineaddr = physical_address & m_block_mask; ruby_request_t * miss = static_cast<ruby_request_t*>(m_request_pool->walkList(NULL)); while (miss != NULL) { if ( miss->match( lineaddr ) ) { return true; } miss = static_cast<ruby_request_t*>(m_request_pool->walkList( miss )); } // Not found return false; } else{ return false; } }
static void InitEndpoints() { DEBUG_OUT(F("USB InitEndpoints\r\n")); // init the first one as a control input for (u8 i = 1; i < sizeof(_initEndpoints); i++) { InitEP(i, pgm_read_byte(_initEndpoints+i), EP_DOUBLE_64); // NOTE: EP_DOUBLE_64 allocates a 'double bank' of 64 bytes, with 64 byte max length // UENUM = i; // UECONX = 1; // UECFG0X = pgm_read_byte(_initEndpoints+i); // UECFG1X = EP_DOUBLE_64; } // UERST = 0x7E; // And reset them // UERST = 0; // TODO: how do I do this? }
StreamComponents::SourceDescriptions* StreamCCMObjectExecutor::get_all_sources() throw(CORBA::SystemException) { DEBUG_OUT ("StreamCCMObjectExecutor: get_all_sources() called"); StreamComponents::SourceDescriptions_var sources = new StreamComponents::SourceDescriptions(); sources->length (sources_.size()); for (unsigned int i = 0; i < sources_.size(); i++) { #ifdef MICO_ORB sources.inout()[i] = sources_[i]->source_description(); #else sources[i] = sources_[i]->source_description(); #endif } return sources._retn(); }
StreamComponents::SinkStreamPort_ptr StreamCCMObjectExecutor::provide_sink_stream_port (const char* name) throw(Components::InvalidName, CORBA::SystemException) { DEBUG_OUT ("StreamCCMObjectExecutor: provide_sink_stream_port() called"); SinkVector::const_iterator sink_iter; for (sink_iter = sinks_.begin(); sink_iter != sinks_.end(); sink_iter++) { if ((*sink_iter)->port_name() == name) { return (*sink_iter)->sink_ref(); } } DEBUG_OUT2 ( "StreamCCMObjectExecutor: No sink registered with name ", name ); throw Components::InvalidName(); }
/** * Task for feeding packets from ISR to lwIP * Loops forever blocking on queue waiting for next status from ISR * @param arg Unused */ static void eth_int_task(void* arg){/*{{{*/ uint32_t status; while(1){ //Loop waiting max time between loops until queue item received while(xQueueReceive(eth_int_q_handle, &status, portMAX_DELAY)!=pdPASS); tivaif_interrupt(&lwip_netif, status); // Reenable interrupts disabled in lwIP_eth_isr() MAP_EMACIntEnable(EMAC0_BASE, (EMAC_INT_PHY| EMAC_INT_RECEIVE| EMAC_INT_RX_NO_BUFFER| EMAC_INT_RX_STOPPED| EMAC_INT_TRANSMIT| EMAC_INT_TX_STOPPED)); #if DEBUG_STACK DEBUG_OUT("Stack Usage: %s: %d\n", __PRETTY_FUNCTION__, uxTaskGetStackHighWaterMark(NULL)); #endif } }/*}}}*/
void GridNodeContainer::initNode(v3s16 ipos, PathGridnode *p_node) { INodeDefManager *ndef = m_pathf->m_env->getGameDef()->ndef(); PathGridnode &elem = *p_node; v3s16 realpos = m_pathf->getRealPos(ipos); MapNode current = m_pathf->m_env->getMap().getNodeNoEx(realpos); MapNode below = m_pathf->m_env->getMap().getNodeNoEx(realpos + v3s16(0, -1, 0)); if ((current.param0 == CONTENT_IGNORE) || (below.param0 == CONTENT_IGNORE)) { DEBUG_OUT("Pathfinder: " << PP(realpos) << " current or below is invalid element" << std::endl); if (current.param0 == CONTENT_IGNORE) { elem.type = 'i'; DEBUG_OUT(PP(ipos) << ": " << 'i' << std::endl); } return; } //don't add anything if it isn't an air node if (ndef->get(current).walkable || !ndef->get(below).walkable) { DEBUG_OUT("Pathfinder: " << PP(realpos) << " not on surface" << std::endl); if (ndef->get(current).walkable) { elem.type = 's'; DEBUG_OUT(PP(ipos) << ": " << 's' << std::endl); } else { elem.type = '-'; DEBUG_OUT(PP(ipos) << ": " << '-' << std::endl); } return; } elem.valid = true; elem.pos = realpos; elem.type = 'g'; DEBUG_OUT(PP(ipos) << ": " << 'a' << std::endl); if (m_pathf->m_prefetch) { elem.directions[DIR_XP] = m_pathf->calcCost(realpos, v3s16( 1, 0, 0)); elem.directions[DIR_XM] = m_pathf->calcCost(realpos, v3s16(-1, 0, 0)); elem.directions[DIR_ZP] = m_pathf->calcCost(realpos, v3s16( 0, 0, 1)); elem.directions[DIR_ZM] = m_pathf->calcCost(realpos, v3s16( 0, 0,-1)); } }
ContainerInterfaceImpl::~ContainerInterfaceImpl() { DEBUG_OUT ("ContainerInterfaceImpl: Destructor called"); QedoLock lock (service_references_mutex_); service_references_.clear(); component_server_->_remove_ref(); /* stop the event thread */ if ( event_queue_thread_ ) { event_queue_mutex_.lock_object(); event_queue_stopping_ = true; event_queue_cond_.signal(); event_queue_mutex_.unlock_object(); event_queue_thread_->join(); delete event_queue_thread_; } }
//////////////////////////////////////////////////////////////////////////////// //to obtain a storage home instance, it raises NotFound if it cannot find a //storage home that matches the given storage_home_id //////////////////////////////////////////////////////////////////////////////// StorageHomeBase_ptr CatalogBaseImpl::find_storage_home(const char* storage_home_id) { DEBUG_OUT("CatalogBaseImpl::find_storage_home() is called"); //find it in the list StorageHomeBase_var pHomeBase = StorageHomeBase::_nil(); for( homeBaseIter_=lHomeBases_.begin(); homeBaseIter_!=lHomeBases_.end(); homeBaseIter_++ ) { const char* szHomeName = (*homeBaseIter_)->getStorageHomeName(); if(strcmp(szHomeName, storage_home_id)==0) { pHomeBase = StorageHomeBase::_duplicate((*homeBaseIter_)); return pHomeBase._retn(); } } //check it whether in the database std::string strHomeID = storage_home_id; strHomeID = convert2Lowercase(strHomeID); if( IsConnected()==FALSE || IsTableExist(strHomeID.c_str())==FALSE ) throw CosPersistentState::NotFound(); //if not in the list, new one. StorageHomeFactory factory = NULL; factory = pConnector_->register_storage_home_factory(storage_home_id, factory); if( factory==NULL ) throw CosPersistentState::NotFound(); StorageHomeBaseImpl* pHomeBaseImpl = factory->create(); //factory->_remove_ref(); pHomeBaseImpl->Init(this, storage_home_id); lHomeBases_.push_back(pHomeBaseImpl); // deep copy or? pHomeBase = StorageHomeBase::_duplicate(pHomeBaseImpl); return pHomeBase._retn(); }
//////////////////////////////////////////////////////////////////////////////// //write to disk any cached modifications of storage object incarnations managed //by this catalog. //////////////////////////////////////////////////////////////////////////////// void CatalogBaseImpl::flush() { DEBUG_OUT("CatalogBaseImpl::flush() is called"); if( !CanTransact() ) NORMAL_OUT( "CatalogBaseImpl::flush() - Database do not support transaction, flush is errorprone!" ); if( access_mode==READ_ONLY ) { NORMAL_ERR( "CatalogBaseImpl::flush() - Session is read-only!" ); return; } std::string strFlush = ""; for( homeBaseIter_=lHomeBases_.begin(); homeBaseIter_!=lHomeBases_.end(); homeBaseIter_++ ) strFlush += (*homeBaseIter_)->getFlush(); if(ExecuteSQL(strFlush.c_str())) { SQLRETURN ret; ret = SQLEndTran(SQL_HANDLE_DBC, hDbc_, SQL_COMMIT); if(ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO) { // the flush is successfull, we set the modified-value of each // storage object back to FALSE for( homeBaseIter_=lHomeBases_.begin(); homeBaseIter_!=lHomeBases_.end(); homeBaseIter_++ ) (*homeBaseIter_)->setBatchUnModified(); } else { NORMAL_ERR( "CatalogBaseImpl::flush() - Database transaction is not successful!" ); } } else { NORMAL_ERR( "CatalogBaseImpl::flush() - flush is not executed!" ); } }
STDMETHODIMP HXASMStream::Subscribe(UINT16 uRuleNumber) { HX_RESULT lResult = HXR_OK; DEBUG_OUT(m_pEM, DOL_ASM, (s, "(%p)Subscribe: Stream=%d Rule=%d", m_pSource, m_uStreamNumber, uRuleNumber)); if (m_pRuleSubscribeStatus) { m_pRuleSubscribeStatus[uRuleNumber] = TRUE; } if (m_pASMRuleState) { m_pASMRuleState->CompleteSubscribe(uRuleNumber); m_pASMRuleState->StartUnsubscribePending(uRuleNumber); } if (m_pAtomicRuleChange) { lResult = HXR_OK; } else if (m_pASMSource) { lResult = m_pASMSource->Subscribe(m_uStreamNumber, uRuleNumber); } if ((lResult == HXR_OK) && m_pStreamSinkMap) { CHXMapPtrToPtr::Iterator lIterator = m_pStreamSinkMap->Begin(); for (; (lIterator != m_pStreamSinkMap->End()) && lResult == HXR_OK; ++lIterator) { IHXASMStreamSink* pASMStreamSink = (IHXASMStreamSink*) *lIterator; lResult = pASMStreamSink->OnSubscribe(uRuleNumber); } } return lResult; }
Components::CCMObject_ptr HomeServantBase::lookup_component (const PortableServer::ObjectId& object_id) { CORBA::OctetSeq_var foreign_key_seq = Key::key_value_from_object_id (object_id); CORBA::OctetSeq_var our_key_seq; CORBA::Object_ptr obj; { // // Do not keep this lock for a long time, it will block other operations // (do not wait for narrow below) // QedoLock lock (component_instances_mutex_); std::vector <ComponentInstance>::iterator components_iter; for (components_iter = component_instances_.begin(); components_iter != component_instances_.end(); components_iter++) { our_key_seq = Key::key_value_from_object_id ((*components_iter).object_id_); if (Qedo::compare_OctetSeqs (foreign_key_seq, our_key_seq)) { break; } } if (components_iter == component_instances_.end()) { DEBUG_OUT ("HomeServantBase: Unknown object id requested in lookup_component"); throw CORBA::OBJECT_NOT_EXIST(); } obj = (*components_iter).component_ref_.in(); } return Components::CCMObject::_narrow(obj); }
/** * Starts XBHServer task */ void start_xbhserver(void){/*{{{*/ int retval; xbh_hndlr_to_srv_q_handle = xQueueCreate(15, sizeof(struct xbh_hndlr_to_srv_msg)); xbh_srv_to_hndlr_q_handle = xQueueCreate(1, sizeof(struct xbh_srv_to_hndlr_msg)); DEBUG_OUT("Starting XBH task\n"); retval = xTaskCreate( xbh_srv_task, "xbh_srv", XBH_SRV_STACK, NULL, XBH_SRV_PRIO, &xbh_srv_task_handle); LOOP_ERRMSG(retval != pdPASS, "Could not create xbh server task\n"); retval = xTaskCreate( xbh_hndlr_task, "xbh_hndlr", XBH_HNDLR_STACK, NULL, XBH_SRV_PRIO, &xbh_hndlr_task_handle); LOOP_ERRMSG(retval != pdPASS, "Could not create xbh handler task\n"); }/*}}}*/
void hsx_fuse_mkdir(fuse_req_t req, fuse_ino_t parent, const char *name, mode_t mode) { int err = 0; struct hsfs_inode *hi_parent = NULL; struct hsfs_inode *new = NULL; struct fuse_entry_param e; struct hsfs_super *sb = NULL; const char *dirname = name; DEBUG_IN("ino:%lu.\n", parent); memset(&e, 0, sizeof(struct fuse_entry_param)); sb = fuse_req_userdata(req); hi_parent = hsx_fuse_iget(sb, parent); if(NULL == sb) { ERR("ERR in fuse_req_userdata"); goto out; } if(NULL == hi_parent) { ERR("ERR in hsx_fuse_iget"); goto out; } err = hsi_nfs3_mkdir(hi_parent, &new, dirname, mode); if(0 != err ) { fuse_reply_err(req, err); goto out; }else { hsx_fuse_fill_reply(new, &e); fuse_reply_entry(req, &e); goto out; } out: DEBUG_OUT(" out errno is: %d\n", err); return; };
void StorageHomeBaseImpl::destroyObject( Pid* pPid ) throw (CORBA::SystemException) { DEBUG_OUT("StorageHomeBaseImpl::destroyObject() is called"); std::string strPid = convertPidToString( pPid ); std::string strSqlDel; strSqlDel = "DELETE FROM "; strSqlDel += strHomeName_; strSqlDel += " WHERE pid LIKE \'"; strSqlDel += strPid; strSqlDel += "\';"; strSqlDel += "DELETE FROM pid_content WHERE pid LIKE \'"; strSqlDel += strPid; strSqlDel += "\';"; //CatalogBaseImpl* pCatalogBaseImpl = dynamic_cast <CatalogBaseImpl*> (pCatalogBase_.in()); CatalogBaseImpl* pCatalogBaseImpl = dynamic_cast <CatalogBaseImpl*> (pCatalogBase_); pCatalogBaseImpl->ExecuteSQL(strSqlDel.c_str()); }
PortableServer::Servant ServantLocator::preinvoke (const PortableServer::ObjectId& oid, PortableServer::POA_ptr adapter, const char* operation, PortableServer::ServantLocator::Cookie& the_cookie ) throw (PortableServer::ForwardRequest, CORBA::SystemException) { // Our helper get_component operation will be handled by a special servant if (!strcmp (operation, "get_component")) { DEBUG_OUT ("ServantLocator: ######### GetComponentHelperServant: returning parametrized helper servant ########"); Components::CCMObject_var ccm_object = home_servant_->lookup_component (oid); Qedo::GetComponentHelperServant* helper_servant = new Qedo::GetComponentHelperServant (ccm_object); return helper_servant; } // // call services registered for preinvoke, but exclude services itself // if(home_servant_->service_name_ == "") { std::vector <Qedo::ComponentInstance> ::iterator iter; Components::CCMService_ptr service; for (iter = home_servant_->container_->services_preinvoke_.begin(); iter != home_servant_->container_->services_preinvoke_.end(); iter++) { service = dynamic_cast<Components::CCMService_ptr>((*iter).executor_locator_.in()); service->preinvoke((*iter).ccm_object_executor_->uuid_.c_str(), operation); } } return home_servant_->lookup_servant (oid); }
//*************************************************************************** void iwindow_t::printDetail( void ) { DEBUG_OUT("Num slots taken: %d\n", getNumSlotsTaken()); DEBUG_OUT("last fetched: %d\n", m_last_fetched); DEBUG_OUT("last decoded: %d\n", m_last_decoded); DEBUG_OUT("last scheduled: %d\n", m_last_scheduled); DEBUG_OUT("last retired: %d\n", m_last_retired); uint32 loc = iwin_increment(m_last_retired); while (loc != m_last_retired) { if (m_window[loc] != NULL) { DEBUG_OUT("window: %d\n", loc); m_window[loc]->printDetail(); } loc = iwin_increment(loc); } if (m_window[m_last_retired] != NULL) { DEBUG_OUT("window: %d\n", m_last_retired); m_window[m_last_retired]->printDetail(); } }
void hsx_fuse_readlink(fuse_req_t req, fuse_ino_t ino) { int st = 0; int err = 0; struct hsfs_inode *hi = NULL; struct hsfs_super *hi_sb = NULL; char *link = NULL; DEBUG_IN("%s\n","THE HSX_FUSE_READLINK."); hi_sb = fuse_req_userdata(req); if(!hi_sb){ ERR("%s gets inode->sb fails \n", progname); err = ENOENT; goto out; } hi = hsfs_ilookup(hi_sb, ino); if(!hi){ ERR("%s gets inode fails \n", progname); err = ENOENT; goto out; } st = hsi_nfs3_readlink(hi,&link); if(st != 0){ err = st; goto out; } fuse_reply_readlink(req, link); out: if(link != NULL){ free(link); } if(st != 0){ fuse_reply_err(req, err); } DEBUG_OUT(" WITH ERRNO %d\n", err); return; }
int main (int argc, char ** argv) { #if defined(_PARENT_SUPERVISION) pid_t pid, status, err; #if defined(_DAEMONIZE) daemon(1, 0); #endif do { pid = fork(); if (pid) { /* Parent */ DEBUG_OUT("Waiting for child\n"); err = waitpid(pid, &status, 0); } else { /* Child */ run_server(argc, argv); exit(0); } } while (1); return 0; #else return run_server(argc, argv); #endif }
//***************************************************************************************** writebuffer_t::writebuffer_t(uint32 id, uint32 block_bits, scheduler_t * eventQ){ ASSERT(WRITE_BUFFER_SIZE >= 0); m_id = id/CONFIG_LOGICAL_PER_PHY_PROC; m_block_size = 1 << block_bits; m_block_mask = ~(m_block_size - 1); m_buffer_size = 0; m_outstanding_stores = 0; m_use_write_buffer = false; m_event_queue = eventQ; m_is_scheduled = false; m_write_buffer_full = false; if(WRITE_BUFFER_SIZE > 0){ m_request_pool = new pipepool_t(); m_use_write_buffer = true; } else{ m_request_pool = NULL; } #ifdef DEBUG_WRITE_BUFFER DEBUG_OUT("*******write_buffer_t::Using Write Buffer? %d\n",m_use_write_buffer); #endif }
bool CompletionPort::getStatus( ULONG_PTR *pCompletionKey, PDWORD pdwNumBytes, OVERLAPPED **ppOverlapped, DWORD dwMilliseconds) { bool ok = true; if (0 == ::GetQueuedCompletionStatus(m_iocp, pdwNumBytes, pCompletionKey, ppOverlapped, dwMilliseconds)) { DWORD lastError = ::GetLastError(); if (lastError != WAIT_TIMEOUT) { //throw CWin32Exception(_T("CIOCompletionPort::GetStatus() - GetQueuedCompletionStatus"), lastError); DEBUG_OUT("GetQueuedCompletionStatus failed. B."); } ok = false; } return ok; }
void CThingyList::ReadStream(LStream& inInputStream, UInt32 streamVersion) { #warning TODO: should only update items that are not already in correct position in the list RemoveItemsAt(GetCount(), 1); // clear all the item from the array UInt16 numThingys; inInputStream >> numThingys; // read in the object count for (long i = 1; i <= numThingys; i++) { // now read in that many objects ThingyRef aRef; inInputStream >> aRef; DEBUG_OUT(" |-- "<<aRef, DEBUG_TRIVIA | DEBUG_CONTAINMENT ); /* #warning FIXME: this debug code is correcting errors that will kill a release version #ifdef DEBUG ArrayIndexT idx = FetchIndexOf(aRef); if (idx != index_Bad) { // make sure we don't have duplicate entries DEBUG_OUT(" | Duplicate entry "<<aRef <<" in "<<this<<" -- skipped", DEBUG_ERROR | DEBUG_CONTAINMENT ); continue; } #else #error critical debug code not included #endif */ InsertItemsAt(1, LArray::index_Last, aRef); } }
int hsi_nfs3_do_getattr(struct hsfs_super *sb, struct nfs_fh3 *fh, struct nfs_fattr *fattr, struct stat *st) { struct getattr3res res; struct fattr3 *attr = NULL; int err; DEBUG_IN("(%p, %p, %p, %p)", sb, fh, fattr, st); memset(&res, 0, sizeof(res)); err = hsi_nfs3_clnt_call(sb, sb->clntp, NFSPROC3_GETATTR, (xdrproc_t)xdr_nfs_fh3, (caddr_t)fh, (xdrproc_t)xdr_getattr3res, (caddr_t)&res); if (err) goto out_no_free; if (NFS3_OK != res.status) { err = hsi_nfs3_stat_to_errno(res.status); ERR("RPC Server returns failed status : %d.\n", err); goto out; } attr = &res.getattr3res_u.attributes; if (fattr){ hsi_nfs3_fattr2fattr(attr, fattr); DEBUG("get nfs_fattr(V:%x, U:%u, G:%u, S:%llu, I:%llu)", fattr->valid, fattr->uid, fattr->gid, fattr->size, fattr->fileid); } if (st) hsi_nfs3_fattr2stat(attr, st); out: clnt_freeres(sb->clntp, (xdrproc_t)xdr_getattr3res, (char *)&res); out_no_free: DEBUG_OUT("with errno %d.\n", err); return err; }
/* for lack of a better way, a window is created that covers the area and when its deleted, it's invalidated */ static int rdpInvalidateArea(ScreenPtr pScreen, int x, int y, int cx, int cy) { WindowPtr pWin; int result; int attri; XID attributes[4]; Mask mask; DEBUG_OUT(("rdpInvalidateArea:\n")); mask = 0; attri = 0; attributes[attri++] = pScreen->blackPixel; mask |= CWBackPixel; attributes[attri++] = xTrue; mask |= CWOverrideRedirect; if (g_wid == 0) { g_wid = FakeClientID(0); } pWin = CreateWindow(g_wid, pScreen->root, x, y, cx, cy, 0, InputOutput, mask, attributes, 0, serverClient, wVisual(pScreen->root), &result); if (result == 0) { g_invalidate_window = pWin; MapWindow(pWin, serverClient); DeleteWindow(pWin, None); g_invalidate_window = pWin; } return 0; }
DCI::AssemblyManager_ptr RepDCIManagerSessionImpl::get_assembly_manager(const char* instance_id) throw(CORBA::SystemException, ::DCI::UnknownAssembly) { // BEGIN USER INSERT SECTION RepDCIManagerSessionImpl::get_assembly_manager /* * Obtain the reference of an AssemblyManager dedicated to the * assembly instance with instanceUUID. */ DEBUG_OUT2( "RepDCIManagerSessionImpl::get_assembly_manager(): start... instance_id=", instance_id); //lookup AssemblyInstance MDE::Deployment::AssemblyInstance_var assinst; try { assinst = this->get_assemblyInstance(instance_id); } catch(...){ throw ::DCI::UnknownAssembly(); } //convert reference to assembly-if CORBA::Object_var obj = ::RepUtils::convert_strRef(assinst->ref()); DCI::AssemblyManager_var ret; try { ret = DCI::AssemblyManager::_narrow(obj); } catch(...) { NORMAL_ERR("RepDCIManagerSessionImpl::get_assembly_manager(): AssemblyManager narrow failed!"); throw CORBA::SystemException(); } if ( CORBA::is_nil ( ret ) ) { NORMAL_ERR("RepDCIManagerSessionImpl::get_assembly_manager(): AssemblyManager reference nil!"); throw CORBA::SystemException(); } DEBUG_OUT( "RepDCIManagerSessionImpl::get_assembly_manager(): ...end"); return ret._retn(); // END USER INSERT SECTION RepDCIManagerSessionImpl::get_assembly_manager }
CORBA::Boolean StorageHomeBaseImpl::objectExists( Pid* pPid ) throw (CORBA::SystemException) { DEBUG_OUT("StorageHomeBaseImpl::objectExists() is called"); std::string strPid = convertPidToString(pPid); std::string strSqlSel; strSqlSel = "SELECT COUNT(*) FROM "; strSqlSel += strHomeName_; strSqlSel += " WHERE pid LIKE \'"; strSqlSel += strPid; strSqlSel += "\';"; if(Open(strSqlSel.c_str())) { long nID = -1; GetFieldValue(0, &nID); return (nID==1); } else return FALSE; }
//**************************************************************************************************** bool writebuffer_t::checkWriteBuffer(pa_t physical_address, ruby_request_t * match){ if(m_use_write_buffer){ #ifdef DEBUG_WRITE_BUFFER DEBUG_OUT("\n***WriteBuffer: checkWriteBuffer BEGIN\n"); #endif pa_t lineaddr = physical_address & m_block_mask; bool found = false; ruby_request_t * miss = static_cast<ruby_request_t*>(m_request_pool->walkList(NULL)); while (miss != NULL) { if ( miss->match( lineaddr ) ) { found = true; match = miss; return true; } miss = static_cast<ruby_request_t*>(m_request_pool->walkList( miss )); } return false; } else{ // if !m_use_write_buffer match = NULL; return false; } }
void RepDCIManagerSessionImpl::deregister_node(const char* node_name) throw(CORBA::SystemException, ::DCI::UnknownNode) { // BEGIN USER INSERT SECTION RepDCIManagerSessionImpl::deregister_node /* * Remove a previously added node manager. * * @param node name * * @throw ::Components::InvalidName * Thrown when the provided name is invalid. */ DEBUG_OUT2( "RepDCIManagerSessionImpl::deregister_node(): start... node=", node_name); //get connection to repository Runtime Model MDE::Deployment::NodeManagerClass_var node_ref = this->get_rep_root()->node_manager_ref(); if ( CORBA::is_nil ( node_ref ) ) { NORMAL_ERR("RepDCIManagerSessionImpl::deregister_node(): NodeClass reference nil!"); throw CORBA::SystemException(); } //lookup node MDE::Deployment::NodeManager_var rep_node = node_ref->lookup(node_name); if(!rep_node) { NORMAL_ERR2("RepDCIManagerSessionImpl::deregister_node(): DCI::UnknownNode() node=", node_name); throw DCI::UnknownNode(); } //delete Node try { rep_node->set_valid(false);//TODO: ref_delete(); does'nt work yet in repository! } catch(...) { NORMAL_ERR2("RepDCIManagerSessionImpl::deregister_node(): error while deleting node in repo; node=", node_name); } DEBUG_OUT( "RepDCIManagerSessionImpl::deregister_node(): ...end"); // END USER INSERT SECTION RepDCIManagerSessionImpl::deregister_node }