• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ PRINTF_DEBUG函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: php_sprintf_appenduint

/* php_spintf_appenduint() {{{ */
inline static void
php_sprintf_appenduint(char **buffer, int *pos, int *size,
					   unsigned long number,
					   int width, char padding, int alignment)
{
	char numbuf[NUM_BUF_SIZE];
	register unsigned long magn, nmagn;
	register unsigned int i = NUM_BUF_SIZE - 1;

	PRINTF_DEBUG(("sprintf: appenduint(%x, %x, %x, %d, %d, '%c', %d)\n",
				  *buffer, pos, size, number, width, padding, alignment));
	magn = (unsigned long) number;

	/* Can't right-pad 0's on integers */
	if (alignment == 0 && padding == '0') padding = ' ';

	numbuf[i] = '\0';

	do {
		nmagn = magn / 10;

		numbuf[--i] = (unsigned char)(magn - (nmagn * 10)) + '0';
		magn = nmagn;
	} while (magn > 0 && i > 0);

	PRINTF_DEBUG(("sprintf: appending %d as \"%s\", i=%d\n", number, &numbuf[i], i));
	php_sprintf_appendstring(buffer, pos, size, &numbuf[i], width, 0,
							 padding, alignment, (NUM_BUF_SIZE - 1) - i, 0, 0, 0);
}
开发者ID:NobleGaz,项目名称:PHP,代码行数:30,代码来源:formatted_print.c


示例2: rx_pkt_thread

void
rx_pkt_thread(void *param)
{
    int unit = (int) param;
    struct _rxctrl *prx_control = bcm_get_rx_control_ptr(unit);
    bcm_pkt_t pPkt;

    PRINTF_DEBUG(("RX:  Packet thread starting\n"));

    /* Sleep on sem */
    while (1) {
        rx_thread_dv_check(unit);

        prx_control->pkt_notify_given = FALSE;

        /* Service as many packets as possible */
        while (!RXQ_EMPTY(&g_rxq_ctrl)) {
            RXQ_DEQUEUE(&g_rxq_ctrl, &pPkt);
            NetdrvSendToEnd(&pPkt);
        }

        sal_sem_take(prx_control->pkt_notify, sal_sem_FOREVER);
    }

    prx_control->thread_exit_complete = TRUE;
    PRINTF_DEBUG(("RX: Packet thread exitting\n"));
    sal_thread_exit(0);

    return;
}
开发者ID:ariavie,项目名称:bcm,代码行数:30,代码来源:netdrv.c


示例3: php_sprintf_append2n

/* php_spintf_appendd2n() {{{ */
inline static void
php_sprintf_append2n(char **buffer, int *pos, int *size, long number,
					 int width, char padding, int alignment, int n,
					 char *chartable, int expprec)
{
	char numbuf[NUM_BUF_SIZE];
	register unsigned long num;
	register unsigned int  i = NUM_BUF_SIZE - 1;
	register int andbits = (1 << n) - 1;

	PRINTF_DEBUG(("sprintf: append2n(%x, %x, %x, %d, %d, '%c', %d, %d, %x)\n",
				  *buffer, pos, size, number, width, padding, alignment, n,
				  chartable));
	PRINTF_DEBUG(("sprintf: append2n 2^%d andbits=%x\n", n, andbits));

	num = (unsigned long) number;
	numbuf[i] = '\0';

	do {
		numbuf[--i] = chartable[(num & andbits)];
		num >>= n;
	}
	while (num > 0);

	php_sprintf_appendstring(buffer, pos, size, &numbuf[i], width, 0,
							 padding, alignment, (NUM_BUF_SIZE - 1) - i,
							 0, expprec, 0);
}
开发者ID:NobleGaz,项目名称:PHP,代码行数:29,代码来源:formatted_print.c


示例4: php_sprintf_appendstring

/* php_spintf_appendstring() {{{ */
inline static void
php_sprintf_appendstring(char **buffer, int *pos, int *size, char *add,
						   int min_width, int max_width, char padding,
						   int alignment, int len, int neg, int expprec, int always_sign)
{
	register int npad;
	int req_size;
	int copy_len;
	int m_width;

	copy_len = (expprec ? MIN(max_width, len) : len);
	npad = min_width - copy_len;

	if (npad < 0) {
		npad = 0;
	}
	
	PRINTF_DEBUG(("sprintf: appendstring(%x, %d, %d, \"%s\", %d, '%c', %d)\n",
				  *buffer, *pos, *size, add, min_width, padding, alignment));
	m_width = MAX(min_width, copy_len);

	if(m_width > INT_MAX - *pos - 1) {
		zend_error_noreturn(E_ERROR, "Field width %d is too long", m_width);
	}

	req_size = *pos + m_width + 1;

	if (req_size > *size) {
		while (req_size > *size) {
			if(*size > INT_MAX/2) {
				zend_error_noreturn(E_ERROR, "Field width %d is too long", req_size); 
			}
			*size <<= 1;
		}
		PRINTF_DEBUG(("sprintf ereallocing buffer to %d bytes\n", *size));
		*buffer = erealloc(*buffer, *size);
	}
	if (alignment == ALIGN_RIGHT) {
		if ((neg || always_sign) && padding=='0') {
			(*buffer)[(*pos)++] = (neg) ? '-' : '+';
			add++;
			len--;
			copy_len--;
		}
		while (npad-- > 0) {
			(*buffer)[(*pos)++] = padding;
		}
	}
	PRINTF_DEBUG(("sprintf: appending \"%s\"\n", add));
	memcpy(&(*buffer)[*pos], add, copy_len + 1);
	*pos += copy_len;
	if (alignment == ALIGN_LEFT) {
		while (npad--) {
			(*buffer)[(*pos)++] = padding;
		}
	}
}
开发者ID:NobleGaz,项目名称:PHP,代码行数:58,代码来源:formatted_print.c


示例5: php_sprintf_appendchar

/* php_spintf_appendchar() {{{ */
inline static void
php_sprintf_appendchar(char **buffer, int *pos, int *size, char add TSRMLS_DC)
{
	if ((*pos + 1) >= *size) {
		*size <<= 1;
		PRINTF_DEBUG(("%s(): ereallocing buffer to %d bytes\n", get_active_function_name(TSRMLS_C), *size));
		*buffer = erealloc(*buffer, *size);
	}
	PRINTF_DEBUG(("sprintf: appending '%c', pos=\n", add, *pos));
	(*buffer)[(*pos)++] = add;
}
开发者ID:NobleGaz,项目名称:PHP,代码行数:12,代码来源:formatted_print.c


示例6: sb_hpet_cfg

/*
 * sb_hpet_cfg :
 * config the HPET module
 */
void sb_hpet_cfg(void)
{
	u8 rev = get_sb600_revision();
	pcitag_t sm_dev = _pci_make_tag(0, 20, 0);

	PRINTF_DEBUG();
#ifdef	CFG_ATI_HPET_BASE
#if	CFG_ATI_HPET_BASE
	if(ati_sb_cfg.hpet_en == SB_ENABLE){
		if(rev >= REV_SB600_A21){
			set_pm_enable_bits(0x55, 1 << 7, 0 << 7);
		}
		ati_sb_cfg.hpet_base = CFG_ATI_HPET_BASE;
		_pci_conf_write(sm_dev, 0x14, ati_sb_cfg.hpet_base);
		set_sbcfg_enable_bits(sm_dev, 0x64, 1 << 10, 1 << 10);
	}
#endif
#endif

	if(rev >= REV_SB600_A21){
		set_pm_enable_bits(0x55, 1 << 7, 1 << 7);
		set_pm_enable_bits(0x52, 1 << 6, 1 << 6);
	}

	return;
}
开发者ID:BarclayII,项目名称:pmon-3amatx,代码行数:30,代码来源:sb_misc.c


示例7: DrvPollRcvPktTask

void
DrvPollRcvPktTask(END_DEVICE *pDrvCtrl)
{
    uint32 stat = 0;
    uint32 rxmask = DS_DESC_DONE_TST(DRV_RX_DMA_CHAN) |
        DS_CHAIN_DONE_TST(DRV_RX_DMA_CHAN);
    uint32 txmask = DS_CHAIN_DONE_TST(0);
    int unit;
    int i = 0;

    PRINTF_DEBUG(("BCM NetDriver is starting polling mode.......\n"));

    for(;;) {
        for (unit = g_RxMinUnit; unit < _n_devices; unit++) {
            i++;
            stat = soc_pci_read(unit, CMIC_DMA_STAT);
            if ((stat & rxmask) != 0) {
                /* soc_dma_done_chain(unit, (uint32)0); */
                NetdrvHandleRcvPkt(pDrvCtrl, unit, stat);
            }

            rx_thread_dv_check(unit);
            if (i > 100) {
                taskDelay(1) ;
                i = 0;
            }
        }
    }
}
开发者ID:ariavie,项目名称:bcm,代码行数:29,代码来源:netdrv.c


示例8: NetdrvConfig

LOCAL void
NetdrvConfig(END_DEVICE *pDrvCtrl)
{
    /* Set promiscuous mode if it's asked for. */

    if (END_FLAGS_GET(&pDrvCtrl->end) & IFF_PROMISC) {
        PRINTF_DEBUG(("\r\nSetting promiscuous mode on!"));
    } else {
        /*VOS_printf("\r\nSetting promiscuous mode off!");*/
    }

    /* Set up address filter for multicasting. */

    if (END_MULTI_LST_CNT(&pDrvCtrl->end) > 0) {
        NetdrvAddrFilterSet (pDrvCtrl);
    }

    

    

    

    return;
}
开发者ID:ariavie,项目名称:bcm,代码行数:25,代码来源:netdrv.c


示例9: sb_last_sata_cache

void sb_last_sata_cache(void)
{
	u32 base;
	u32 val;
	pcitag_t sata_dev = _pci_make_tag(0, 0x12, 0);

	PRINTF_DEBUG();
	if(ati_sb_cfg.sata_cache_base){
		/* store sata base, size and signature */
		base = ati_sb_cfg.sata_cache_base | 0xa0000000;
		*(volatile u32 *)(base + 0x08) = ati_sb_cfg.sata_cache_base;
		*(volatile u32 *)(base + 0x04) = ati_sb_cfg.sata_cache_size;
		*(volatile u8 *)(base + 0x00) = 'A';
		*(volatile u8 *)(base + 0x01) = 'T';
		*(volatile u8 *)(base + 0x02) = 'i';
		*(volatile u8 *)(base + 0x03) = 'B';

		/* disable IO access */
		set_sbcfg_enable_bits(sata_dev, 0x04, 1 << 0, 0 << 0);

		/* reserved bit */
		set_sbcfg_enable_bits(sata_dev, 0x40, 1 << 20, 1 << 20);

		/* set cache base addr */
		val = _pci_conf_read(sata_dev, 0x10);
		val &= 0x00ffffff;
		val |= (ati_sb_cfg.sata_cache_base >> 24) << 24;
		_pci_conf_write(sata_dev, 0x10, val);
	}
开发者ID:BarclayII,项目名称:pmon-3amatx,代码行数:29,代码来源:sb_sata.c


示例10: atiKbRstWaCheck

int atiKbRstWaCheck(void)
{
	u8 type = get_sb600_platform();

	PRINTF_DEBUG();
	/*enable keyboard reset only if not AMD systerm*/
	if(type == K8_ID)
		return disable_kb_rst_smi();
	else	
		return enable_kb_rst_smi();	
}
开发者ID:BarclayII,项目名称:pmon-3amatx,代码行数:11,代码来源:sb_smi.c


示例11: atiSbirqSmiCheck

int atiSbirqSmiCheck(void)
{
	u8 type = get_sb600_platform();

	PRINTF_DEBUG();
	if(type == K8_ID){
		set_pm_enable_bits(0x3, 1, 1);
		set_pm_enable_bits(0x6, 1, 1);
		return 0;
	}
	return 1;
}
开发者ID:BarclayII,项目名称:pmon-3amatx,代码行数:12,代码来源:sb_smi.c


示例12: sb_sata_channel_reset

/*
 * satachannel_reset
 * detect and reset sata channel
 */
void sb_sata_channel_reset(void)
{
	PRINTF_DEBUG();
	if(ati_sb_cfg.sata_channel == SB_ENABLE){
		if( (ati_sb_cfg.sata_class == 0) 		/* native ide mode */
			|| (ati_sb_cfg.sata_class == 3)		/* legacy ide mode */
			|| (ati_sb_cfg.sata_class == 4) ){	/* ide->ahci mode*/
			sata_drive_detecting();
		}
	}

	return;
}
开发者ID:BarclayII,项目名称:pmon-3amatx,代码行数:17,代码来源:sb_sata.c


示例13: NetdrvStart

int
NetdrvStart(END_DEVICE * pDrvCtrl)
{

#ifdef POLLING_MODE
    unsigned int unit;

   if (started == 1) { return OK; }
#endif

    /** start RX Tasks */
    PRINTF_DEBUG(("BCM NetDriver is starting .......\n"));

#ifdef POLLING_MODE
    if (_n_devices > MAX_DEVICES) {
        printf("\r\nCannot support switch chips over 4\r\n");
        return ERROR;
    }
#endif /* POLLING_MODE */

    __netDriver = pDrvCtrl;

    if (GetMacFromFlash(pDrvCtrl->enetAddr) == ERROR) {
        printf("Error: unable to start netdrv (Invalid MAC Address)\n");
        return ERROR;
    }

    bcopy ((char *)pDrvCtrl->enetAddr, 
           (char *)END_HADDR(&pDrvCtrl->end),
           END_HADDR_LEN(&pDrvCtrl->end));
    {
        extern void   bcmSystemInit();
        bcmSystemInit();
        taskDelay(100);
    }

    END_FLAGS_SET (&pDrvCtrl->end, IFF_UP | IFF_RUNNING);

#ifdef POLLING_MODE
    gPollRecvTaskId =
        taskSpawn("RxPollTask", 100, 0, 16384, (FUNCPTR)DrvPollRcvPktTask,
                   (int)pDrvCtrl, 0, 0, 0, 0, 0, 0, 0, 0, 0);
    if (gPollRecvTaskId == ERROR) {
        return ERROR;
    }
    started = 1;
#endif /* POLLING_MODE */

    return (OK);
}
开发者ID:ariavie,项目名称:bcm,代码行数:50,代码来源:netdrv.c


示例14: NetdrvPollStart

LOCAL STATUS
NetdrvPollStart(END_DEVICE * pDrvCtrl)
{
    int  oldLevel;

    PRINTF_DEBUG(("\r\n  NetdrvPollStart STARTED"));

    oldLevel = intLock (); /* disable ints during update */

    pDrvCtrl->flags |= NETDRV_POLLING;

    intUnlock (oldLevel); /* now NetdrvInt won't get confused */

    NetdrvConfig (pDrvCtrl); /* reconfigure device */

    return (OK);
}
开发者ID:ariavie,项目名称:bcm,代码行数:17,代码来源:netdrv.c


示例15: NetdrvPollStop

LOCAL STATUS
NetdrvPollStop(END_DEVICE * pDrvCtrl)
{
    int  oldLevel;

    oldLevel = intLock (); /* disable ints during register updates */

    
    pDrvCtrl->flags &= ~NETDRV_POLLING;

    intUnlock(oldLevel);

    NetdrvConfig(pDrvCtrl);

    PRINTF_DEBUG(("\r\nNO POLLING"));

    return (OK);
}
开发者ID:ariavie,项目名称:bcm,代码行数:18,代码来源:netdrv.c


示例16: php_sprintf_getnumber

/* php_spintf_getnumber() {{{ */
inline static int
php_sprintf_getnumber(char *buffer, int *pos)
{
	char *endptr;
	register long num = strtol(&buffer[*pos], &endptr, 10);
	register int i = 0;

	if (endptr != NULL) {
		i = (endptr - &buffer[*pos]);
	}
	PRINTF_DEBUG(("sprintf_getnumber: number was %d bytes long\n", i));
	*pos += i;

	if (num >= INT_MAX || num < 0) {
		return -1;
	} else {
		return (int) num;
	}
}
开发者ID:NobleGaz,项目名称:PHP,代码行数:20,代码来源:formatted_print.c


示例17: atiP92WaCheck

int atiP92WaCheck(void)
{
	pcitag_t sm_dev = _pci_make_tag(0, 20, 0);;
	u8 type = get_sb600_platform();

	PRINTF_DEBUG();
	DEBUG_INFO("p92_TRAP_BASE is %x\n", P92_TRAP_BASE);
	DEBUG_INFO("p92_TRAP_EN_REG is %x\n", P92_TRAP_EN_REG);
	/*enable keyboard reset only if not AMD systerm*/
	if(type == K8_ID){
		/* enable Port 92 trap on ProgramIoX*/	
		set_pm_enable_bits(P92_TRAP_BASE, 0xff, 0x92);
		set_pm_enable_bits(P92_TRAP_BASE + 1, 0xff, 0);
		set_pm_enable_bits(P92_TRAP_EN_REG, P92_TRAP_EN_BIT, P92_TRAP_EN_BIT);
		/*disable port 92 decoding*/
		set_sbcfg_enable_bits(sm_dev, 0x78, 1 << 14, 0);	
		/* set ACPI flag for port 92 trap*/
		ati_sb_cfg.p92t = P92_TRAP_ON_PIO;
		return 0; 
	} else	
		return 1;	
}
开发者ID:BarclayII,项目名称:pmon-3amatx,代码行数:22,代码来源:sb_smi.c


示例18: _tx_dv_alloc

static dv_t *
_tx_dv_alloc(int unit, int pkt_count, int dcb_count,
             bcm_pkt_cb_f chain_done_cb, void *cookie, int per_pkt_cb) 
{
    dv_t *dv;
    /* tx_dv_info_t *dv_info; */

    if (pkt_count > SOC_DV_PKTS_MAX) {
        PRINTF_DEBUG(("TX array:  Cannot TX more than %d pkts. "
            "Attempting %d.\n", SOC_DV_PKTS_MAX, pkt_count));
        return NULL;
    }

    if ((dv = soc_dma_dv_alloc(unit, DV_TX, dcb_count)) == NULL) {
        return NULL;
    }

    /* PRINTF_DEBUG(("=> %p %p\n", dv, dv_info)); */

    dv->dv_done_chain = _tx_dv_free;

    return dv;
}
开发者ID:Reedgarden,项目名称:bcm-sdk-xgs,代码行数:23,代码来源:dmaTx.c


示例19: sb_last_smi_service_check

void sb_last_smi_service_check(void)
{
	int i = 0;
	struct ati_sb_smi *p = atiSbSmiPostTbl;
	struct ati_sb_smi *q = atiSbSmiRunTbl;

	PRINTF_DEBUG();
	while(1){
		if(p->service_routine == ~0)	
			return;
		if((u32)p->check_routine == ~0) {
			p++;
			continue;	
		}
		if(p->check_routine() == 0)
			return;	
		memcpy(q, q, sizeof(struct ati_sb_smi));	// copy a struct
		i++;
		if(i >= (RUNTBL_SIZE - 1))
			return;
		p++;
		q++;
	}
}
开发者ID:BarclayII,项目名称:pmon-3amatx,代码行数:24,代码来源:sb_smi.c


示例20: sb_last_sata_unconnected_shutdown_clock

void sb_last_sata_unconnected_shutdown_clock(void)
{
	u8 sata_class = ati_sb_cfg.sata_class;
	pcitag_t sata_dev = _pci_make_tag(0, 18, 0);
	u32 temp;

	PRINTF_DEBUG();
	if(ati_sb_cfg.sata_ck_au_off == SB_ENABLE){	// auto off
		if(ati_sb_cfg.sata_channel > 0){		// enable sata
			switch(sata_class){
				case 0 :
				case 3 :
				case 4 :
					temp = _pci_conf_read(sata_dev, 0x40);
					temp |= (ati_sb_cfg.sb600_sata_sts & 0xFF0F) << 16;
					_pci_conf_write(sata_dev, 0x40, temp);
				default :

			}
		}
	}

	return;
}
开发者ID:BarclayII,项目名称:pmon-3amatx,代码行数:24,代码来源:sb_sata.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ PRINTK_2函数代码示例发布时间:2022-05-30
下一篇:
C++ PRINT6ADDR函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap