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


C++ PRINTF_DEBUG函数代码示例

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


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


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