当前位置: 首页>>代码示例>>C++>>正文


C++ DEBUG_ERR函数代码示例

本文整理汇总了C++中DEBUG_ERR函数的典型用法代码示例。如果您正苦于以下问题:C++ DEBUG_ERR函数的具体用法?C++ DEBUG_ERR怎么用?C++ DEBUG_ERR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了DEBUG_ERR函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: get_global_paddr

static void get_global_paddr(struct monitor_blocking_binding *b)
{
    genpaddr_t global = 0;
    errval_t err;
    err = invoke_get_global_paddr(cap_kernel, &global);
    if (err_is_fail(err)) {
        DEBUG_ERR(err, "get_global_paddr invocation");
    }

    err = b->tx_vtbl.get_global_paddr_response(b, NOP_CONT, global);
    if (err_is_fail(err)) {
        USER_PANIC_ERR(err, "sending global paddr failed.");
    }
}
开发者ID:achreto,项目名称:barrelfish,代码行数:14,代码来源:monitor_rpc_server.c

示例2: usb_hal_bus_deinit

 u8 usb_hal_bus_deinit(_adapter * padapter){

	u8			tmp8;
	_func_enter_;
	
	//4	Turn off LDO
	usbvendorrequest(&padapter->dvobjpriv, RT_USB_GET_REGISTER, RT_USB_LDO, 0, &tmp8, 1, _TRUE);
	DEBUG_ERR(("usb_hal_bus_deinit() : LDO = %d\n", tmp8));
	if (tmp8 == 0x00){
		DEBUG_ERR(("usb_hal_bus_deinit() : LDO is off. No necessary to Turn it off.\n"));
	} else {
		DEBUG_ERR(("usb_hal_bus_deinit() : LDO is on. Need to Turn it off.\n"));
		usbvendorrequest(&padapter->dvobjpriv, RT_USB_SET_REGISTER, RT_USB_LDO, RT_USB_LDO_OFF,  NULL, 0, _FALSE);
		msleep_os(100); 
		usbvendorrequest(&padapter->dvobjpriv, RT_USB_GET_REGISTER, RT_USB_LDO, 0, &tmp8, 1, _TRUE);
		DEBUG_ERR(("usb_hal_bus_deinit() : LDO = %d\n", tmp8));

	}

		
	_func_exit_;
	return _SUCCESS;
 }
开发者ID:OpenHMR,项目名称:Open-HMR600,代码行数:23,代码来源:usb_halinit.c

示例3: revoke_cap

static void revoke_cap(struct xcorecap_binding *b)
{
    errval_t err;
    printf("xcorecapserv do revoke cap\n");
    err = cap_revoke(sent_cap);
    if (err_is_fail(err)) {
        DEBUG_ERR(err, "xcorecapserv: revoke failed\n");    
    } 

    printf("xcorecapserv revoked cap\n");
    fflush(stdout);

    b->tx_vtbl.send_done(b, NOP_CONT);
}
开发者ID:CoryXie,项目名称:BarrelfishOS,代码行数:14,代码来源:xcorecapserv.c

示例4: send_ints_ready

static void send_ints_ready(void *a)
{
    errval_t err;

    struct xmplmsg_binding *b = (struct xmplmsg_binding*)a;

    struct event_closure txcont = MKCONT(send_ints_cb, b);

    err = xmplmsg_msg_ints__tx(b, txcont, 0x1, 0x10);

    if (err_is_fail(err)) {
      DEBUG_ERR(err, "error sending msg_ints message\n");
    }
}
开发者ID:CoryXie,项目名称:BarrelfishOS,代码行数:14,代码来源:msg.c

示例5: server_listening

/**
 * \brief Called when domain gets a interdisp service.
 * It will set it on the domain_state.
 */
static void server_listening(void *st, errval_t err, iref_t iref)
{
    if(err_is_fail(err)) {
        DEBUG_ERR(err, "interdisp service export");
        abort();
    }

    struct domain_state *domain_state = get_domain_state();
    domain_state->iref = iref;

    // Also set in the global array
    allirefs[disp_get_core_id()] = iref;
    domain_state->conditional = true;
}
开发者ID:MichaelFQuigley,项目名称:barrelfish,代码行数:18,代码来源:domain.c

示例6: udp_receiver

static void
udp_receiver(struct udp_pcb *upcb, struct ip_addr *listen_ip,
        uint16_t listen_port)
{
    printf("U: Going in UDP_RECEIVER mode\n");
    // Bind to specified port
    errval_t r = udp_bind(upcb, listen_ip, listen_port);
    if (err_is_fail(r)) {
        DEBUG_ERR(r, "udp_bind:");
    }

    lwip_benchmark_control(connection_type, BMS_START_REQUEST,
            iterations, rdtsc());
    udp_recv(upcb, udp_recv_handler, 0 /*client data, arg in callback*/);

    while (true) {
        r = event_dispatch(ws);
        if (err_is_fail(r)) {
            DEBUG_ERR(r, "in event_dispatch");
            break;
        }
    }
} // end function: udp_receiver
开发者ID:CoryXie,项目名称:BarrelfishOS,代码行数:23,代码来源:udp_test.c

示例7: default_start_function

errval_t default_start_function(coreid_t where, struct module_info* mi,
                                char* record)
{
    assert(mi != NULL);
    errval_t err = SYS_ERR_OK;

    if (is_started(mi)) {
        return KALUGA_ERR_DRIVER_ALREADY_STARTED;
    }

    if (!is_auto_driver(mi)) {
        return KALUGA_ERR_DRIVER_NOT_AUTO;
    }

    // Construct additional command line arguments containing pci-id.
    // We need one extra entry for the new argument.
    uint64_t vendor_id, device_id;
    char **argv = mi->argv;
    bool cleanup = false;
    err = oct_read(record, "_ { vendor: %d, device_id: %d }",
                   &vendor_id, &device_id);
    if (err_is_ok(err)) {
        // We assume that we're starting a device if the query above succeeds
        // and therefore append the pci vendor and device id to the argument
        // list.
        argv = malloc((mi->argc+1) * sizeof(char *));
        memcpy(argv, mi->argv, mi->argc * sizeof(char *));
        char *pci_id  = malloc(10);
        // Make sure pci vendor and device id fit into our argument
        assert(vendor_id < 0x9999 && device_id < 0x9999);
        snprintf(pci_id, 10, "%04"PRIx64":%04"PRIx64, vendor_id, device_id);
        argv[mi->argc] = pci_id;
        mi->argc += 1;
        argv[mi->argc] = NULL;
        cleanup = true;
    }
    err = spawn_program(where, mi->path, argv,
                        environ, 0, &mi->did);

    if (err_is_fail(err)) {
        DEBUG_ERR(err, "Spawning %s failed.", mi->path);
    }
    if (cleanup) {
        // alloc'd string is the last of our array
        free(argv[mi->argc-1]);
        free(argv);
    }

    return err;
}
开发者ID:huiweics,项目名称:arrakis,代码行数:50,代码来源:driver_startup.c

示例8: ADDTOCALLSTACK

bool CTeleport::RealizeTeleport()
{
	ADDTOCALLSTACK("CTeleport::RealizeTeleport");
	if ( ! IsCharValid() || ! m_ptDst.IsCharValid())
	{
		DEBUG_ERR(( "CTeleport bad coords %s\n", WriteUsed() ));
		return false;
	}
	CSector *pSector = GetSector();
	if ( pSector )
		return pSector->AddTeleport(this);
	else
		return false;
}
开发者ID:roberpot,项目名称:Source,代码行数:14,代码来源:CRegion.cpp

示例9: span_cb

static void span_cb(void *arg, errval_t err)
{
	if (err_is_fail(err)) {
		DEBUG_ERR(err, "span failed");
		return;
	}

	static int num_spanned = 1;

	num_spanned++;
	if (num_spanned >= num_to_span) {
		all_spanned = true;
	}
}
开发者ID:dshynd,项目名称:msc-project,代码行数:14,代码来源:runtime_main.c

示例10: send_udp_frame

int send_udp_frame(int fd, void *pout, int length, const struct sockaddr_in *sin)
{
	assert( sin && pout );
	
	int send_len = 0;
	send_len = sendto( fd, pout, length, 0, (struct sockaddr*)sin, sizeof(struct sockaddr_in));
	if( send_len < 0)
	{
		DEBUG_ERR("udp send failed!");
		assert(send_len >= 0);
	}

	return send_len;
}
开发者ID:YasirLiang,项目名称:suntrun1,代码行数:14,代码来源:avdecc_net.c

示例11: XADynamicSourceItfImpl_SetSource

/* XAResult XADynamicSourceItfImpl_SetSource
 * Description: Sets the data source for the object.
 */
XAresult XADynamicSourceItfImpl_SetSource(XADynamicSourceItf self,
        XADataSource *pDataSource)
{
    XAresult res = XA_RESULT_SUCCESS;
    XADynamicSourceItfImpl* impl = (XADynamicSourceItfImpl*) (*self);
    DEBUG_API("->XADynamicSourceItfImpl_SetSource");
    /* check casting */
    if (!impl || impl != impl->self || !pDataSource)
    {
        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
        DEBUG_API("<-XADynamicSourceItfImpl_SetSource");
        return XA_RESULT_PARAMETER_INVALID;
    }

    if (!impl->adaptCtx)
    {
        DEBUG_ERR("Adaptation not ready!!");
        DEBUG_ERR("XA_RESULT_INTERNAL_ERROR");
        DEBUG_API("<-XADynamicSourceItfImpl_SetSource");
        res = XA_RESULT_INTERNAL_ERROR;
    }
    else
    {
        res = XACommon_CheckDataSource(pDataSource, NULL);
        if (res == XA_RESULT_SUCCESS)
        {
            if (impl->adaptCtx->fwtype == FWMgrFWMMF)
            {
                res = XADynamicSourceItfAdaptMMF_SetSource(
                          (XAAdaptationMMFCtx*) impl->adaptCtx, pDataSource);
            }
        }
    }

    DEBUG_API("<-XADynamicSourceItfImpl_SetSource");
    return res;
}
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:40,代码来源:xadynamicsourceitf.c

示例12: ADDTOCALLSTACK

bool CItemStone::CheckValidMember( CStoneMember * pMember )
{
	ADDTOCALLSTACK("CItemStone::CheckValidMember");
	ASSERT(pMember);
	ASSERT( pMember->GetParent() == this );

	if ( GetAmount()==0 || g_Serv.m_iExitFlag )	// no reason to elect new if the stone is dead.
		return( true );	// we are deleting anyhow.

	switch ( pMember->GetPriv())
	{
		case STONEPRIV_MASTER:
		case STONEPRIV_MEMBER:
		case STONEPRIV_CANDIDATE:
		case STONEPRIV_ACCEPTED:
			if ( GetMemoryType())
			{
				// Make sure the member has a memory that links them back here.
				CChar * pChar = pMember->GetLinkUID().CharFind();
				if ( pChar == NULL )
					break;
				if ( pChar->Guild_Find( GetMemoryType()) != this )
					break;
			}
			return( true );
		case STONEPRIV_ENEMY:
			{
				CItemStone * pEnemyStone = dynamic_cast <CItemStone *>( pMember->GetLinkUID().ItemFind());
				if ( pEnemyStone == NULL )
					break;
				CStoneMember * pEnemyMember = pEnemyStone->GetMember(this);
				if ( pEnemyMember == NULL )
					break;
				if ( pMember->GetWeDeclared() && ! pEnemyMember->GetTheyDeclared())
					break;
				if ( pMember->GetTheyDeclared() && ! pEnemyMember->GetWeDeclared())
					break;
			}
			return( true );

		default:
			break;
	}

	// just delete this member. (it is mislinked)
	DEBUG_ERR(( "Stone UID=0%lx has mislinked member uid=0%lx\n", 
		(DWORD) GetUID(), (DWORD) pMember->GetLinkUID()));
	return( false );
}
开发者ID:WangXYZ,项目名称:SphereServer_Source,代码行数:49,代码来源:CItemStone.cpp

示例13: XAVideoPostProcessingItfImpl_Commit

/**
 * XAresult XAVideoPostProcessingItfImpl_Commit(XAVideoPostProcessingItf self)
 * Description: Commit all video post-processing changes since the last Commit().
 */
XAresult XAVideoPostProcessingItfImpl_Commit(XAVideoPostProcessingItf self)
{
    XAresult ret = XA_RESULT_SUCCESS;
    XAVideoPostProcessingItfImpl* impl = GetImpl(self);
    DEBUG_API("->XAVideoPostProcessingItfImpl_Commit");
    if(!impl)
    {
        DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
        DEBUG_API("<-XAVideoPostProcessingItfImpl_Commit");
        /* invalid parameter */
        return XA_RESULT_PARAMETER_INVALID;
    }

 
    ret = XAAdaptationBase_ThreadEntry(impl->adapCtx);
    if( ret == XA_RESULT_PARAMETER_INVALID || ret == XA_RESULT_PRECONDITIONS_VIOLATED )
    {
    	DEBUG_API("<-XAVideoPostProcessingItfImpl_Commit");
    	return ret;
    }

    ret = XAVideoPostProcessingItfAdapt_Commit((XAAdaptationMMFCtx*)impl->adapCtx,
                                               impl->rotation,
                                               impl->scaleOptions,
                                               impl->backgroundColor,
                                               impl->renderingHints,
                                               &impl->srcRect,
                                               &impl->destRect,
                                               impl->mirror,
                                               impl->isMirror,
                                               impl->isRotate,
                                               impl->isDestRect,
											   impl->isSrcRect,
											   impl->isScaleOptions);

    if( ret == XA_RESULT_SUCCESS )
    {
        impl->isMirror = XA_BOOLEAN_FALSE;
        impl->isRotate = XA_BOOLEAN_FALSE;
		impl->isDestRect = XA_BOOLEAN_FALSE;
		impl->isSrcRect = XA_BOOLEAN_FALSE;
		impl->isScaleOptions = XA_BOOLEAN_FALSE;
    }

    XAAdaptationBase_ThreadExit(impl->adapCtx);
  
    DEBUG_API("<-XAVideoPostProcessingItfImpl_Commit");
    return ret;
}
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:53,代码来源:xavideopostprocessingitf.c

示例14: ADDTOCALLSTACK

void CItemSpawn::GenerateChar(CResourceDef *pDef)
{
	ADDTOCALLSTACK("CitemSpawn:GenerateChar");

	RESOURCE_ID_BASE rid = pDef->GetResourceID();
	if ( rid.GetResType() == RES_SPAWN )
	{
		const CRandGroupDef *pSpawnGroup = static_cast<const CRandGroupDef *>(pDef);
		ASSERT(pSpawnGroup);
		size_t i = pSpawnGroup->GetRandMemberIndex();
		if ( i != pSpawnGroup->BadMemberIndex() )
			rid = pSpawnGroup->GetMemberID(i);
	}

	if ( (rid.GetResType() != RES_CHARDEF) && (rid.GetResType() != RES_UNKNOWN) )
		return;

	CPointMap pt = GetTopPoint();
	CRegionBase *pRegion = pt.GetRegion(REGION_TYPE_AREA);
	if ( !pRegion )
		return;

	CChar *pChar = CChar::CreateBasic(static_cast<CREID_TYPE>(rid.GetResIndex()));
	if ( !pChar )
		return;

	pChar->NPC_LoadScript(true);
	pChar->StatFlag_Set(STATF_Spawned);

	// Try placing the char near the spawn
	if ( !pChar->MoveNearObj(this, m_itSpawnChar.m_DistMax) || !pChar->CanSeeLOS(pt) )
	{
		// If this fails, try placing the char over the spawn
		if ( !pChar->MoveTo(pt) )
		{
			DEBUG_ERR(("Spawn UID:0%lx is unable to place a character inside the world.\n", static_cast<DWORD>(GetUID())));
			pChar->Delete();
			return;
		}
	}

	AddObj(pChar->GetUID());
	pChar->NPC_CreateTrigger();		// removed from NPC_LoadScript() and triggered after char placement and attachment to the spawnitem
	pChar->Update();

	size_t iCount = GetTopSector()->GetCharComplexity();
	if ( iCount > g_Cfg.m_iMaxCharComplexity )
		g_Log.Event(LOGL_WARN, "%" FMTSIZE_T " chars at %s. Sector too complex!\n", iCount, GetTopSector()->GetBasePoint().WriteUsed());
}
开发者ID:shiryux,项目名称:Source,代码行数:49,代码来源:CItemSpawn.cpp

示例15: vfs_init

/**
 * \brief Initialise the VFS library
 *
 * This call initialises the VFS library. It must be called prior to any
 * other VFS functions being used. It doesn't need to be a constructor
 * We call it explicitly..
 */
void vfs_init(void)
{
    assert(mounts == NULL);
    errval_t err;

    // init libc glue
    vfs_fopen_init();

    // mount ramfs on root, as a sensible default setup for the time being
    err = vfs_mount("/", "ramfs://");
    if (err_is_fail(err)) {
        DEBUG_ERR(err, "error mounting ramfs");
        // continue anyway...
    }
}
开发者ID:CoryXie,项目名称:BarrelfishOS,代码行数:22,代码来源:vfs.c


注:本文中的DEBUG_ERR函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。