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

C++ KDEBUG函数代码示例

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

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



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

示例1: bios_4

static LONG bios_4(WORD r_w, UBYTE *adr, WORD numb, WORD first, WORD drive, LONG lfirst)
{
    LONG ret;
    KDEBUG(("BIOS rwabs(rw = %d, addr = 0x%08lx, count = 0x%04x, "
            "sect = 0x%04x, dev = 0x%04x, lsect = 0x%08lx)",
            r_w, adr, numb, first, drive, lfirst));
    ret = lrwabs(r_w, adr, numb, first, drive, lfirst);
    KDEBUG((" = 0x%08lx\n", ret));
    return ret;
}
开发者ID:kelihlodversson,项目名称:emutos,代码行数:10,代码来源:bios.c


示例2: MGET

/*
 *  xmgetmd - get an MD
 *
 *  To create a single pool for all osmem requests, MDs are grouped in
 *  blocks of 3 called MDBLOCKs which occupy 58 bytes.  MDBLOCKs are
 *  handled as follows:
 *    . they are linked in a chain, initially empty
 *    . when the first MD is required, an MDBLOCK is obtained via
 *      xmgetblk() and put on the chain, and the first slot is allocated
 *    . MDs are obtained from existing partially-used MDBLOCKS
 *    . when an MDBLOCK is full, it is removed from the chain
 *    . when an MD in a full MDBLOCK is freed, the MDBLOCK is put back
 *      on the chain
 *    . when the MDBLOCK is totally unused, it is put back on the normal
 *      free chain
 */
MD *xmgetmd(void)
{
    MDBLOCK *mdb = mdbroot;
    MD *md;
    WORD i, avail;

    if (!mdb)
    {
        mdb = MGET(MDBLOCK);
        if (!mdb)
            return NULL;

        /* initialise new MDBLOCK */
        mdb->mdb_next = NULL;
        for (i = 0; i < MDS_PER_BLOCK; i++)
            mdb->entry[i].index = -1;   /* unused */
        mdbroot = mdb;
        KDEBUG(("xmgetmd(): got new MDBLOCK at %p\n",mdb));
    }

    /*
     * allocate MD from MDBLOCK
     */
    for (i = 0, avail = 0, md = NULL; i < MDS_PER_BLOCK; i++)
    {
        if (mdb->entry[i].index < 0)
        {
            if (!md)                /* not yet allocated */
            {
                mdb->entry[i].index = i;
                md = &mdb->entry[i].md;
                KDEBUG(("xmgetmd(): got MD at %p\n",md));
            }
            else avail++;
        }
    }

    if (!md)
    {
        KDEBUG(("xmgetmd(): MDBLOCK at %p is invalid, no free entries\n",mdb));
        return NULL;
    }

    /*
     * remove full MDBLOCK from mdb chain
     */
    if (avail == 0)
    {
        KDEBUG(("xmgetmd(): MDBLOCK at %p is now full\n",mdb));
        if (unlink_mdblock(mdb) == 0)
            KDEBUG(("xmgetmd(): removed MDBLOCK at %p from mdb chain\n",mdb));
    }

    return md;
}
开发者ID:kelihlodversson,项目名称:emutos,代码行数:71,代码来源:osmem.c


示例3: run_auto_program

static void run_auto_program(const char* filename)
{
    char path[30];

    strcpy(path, "\\AUTO\\");
    strcat(path, filename);

    KDEBUG(("Loading %s ...\n", path));
    trap1_pexec(PE_LOADGO, path, "", default_env);  /* Pexec */
    KDEBUG(("[OK]\n"));
}
开发者ID:kelihlodversson,项目名称:emutos,代码行数:11,代码来源:bios.c


示例4: KDEBUG

void Line::mousePressEvent(QMouseEvent *e)
{
#if 0
  int x, y;
#endif
  QPainter paint;

  KDEBUG(KDEBUG_INFO, 3000, "RubberLine::mousePressEvent() handler called\n");

  if (isActive()) {
    if (drawing) {
      KDEBUG(KDEBUG_INFO, 3000, "Line: Warning button press received while drawing\n");
    }
    else {
      startx= (e->pos()).x();
      starty= (e->pos()).y();
      activeButton= e->button();
      lastx= startx;
      lasty= starty;
      drawing= TRUE;
    }
  }

#if 0
  // This code used to allow multi segment lines (badly)
  // It is being replaced by a seperate polyline tool.
  else if (isActive() && (e->button() == RightButton) && drawing) {
    x= (e->pos()).x();
    y= (e->pos()).y();

    // Erase old line
    paint.begin(canvas->zoomedPixmap());
    paint.setPen(leftpen);
    paint.setRasterOp(XorROP);
    paint.drawLine(startx, starty, lastx, lasty);
    paint.setRasterOp(CopyROP);
    // Draw new line
    paint.drawLine(startx, starty, lastx, lasty);
    paint.end();

    startx= x;
    starty= y;
    lastx= startx;
    lasty= starty;
  }

  canvas->repaint(0);
#endif
  
  if (!isActive()) {
KDEBUG(KDEBUG_WARN, 3000, "Line: Warning event received when inactive (ignoring)\n");
  }
}
开发者ID:kthxbyte,项目名称:KDE1-Linaro,代码行数:53,代码来源:line.cpp


示例5: download_client_probe

static int download_client_probe(struct platform_device *pdev)
{
	int ret = -1;
	struct download_client *download_client_data;
	struct m4sensorhub_data *m4sensorhub = m4sensorhub_client_get_drvdata();

	if (!m4sensorhub) {
		printk(KERN_WARNING "m4sensorhub is null\n");
		return -EFAULT;
	}

	download_client_data =
		kzalloc(sizeof(*download_client_data), GFP_KERNEL);
	if (!download_client_data)
		return -ENOMEM;

	download_client_data->m4sensorhub = m4sensorhub;
	platform_set_drvdata(pdev, download_client_data);

	ret = misc_register(&download_client_miscdrv);
	if (ret < 0) {
		KDEBUG(M4SH_ERROR, "Error registering %s driver\n",
				 DOWNLOAD_CLIENT_DRIVER_NAME);
		goto free_memory;
	}
	misc_download_data = download_client_data;
	ret = m4sensorhub_register_initcall(download_driver_init,
						download_client_data);
	if (ret < 0) {
		KDEBUG(M4SH_ERROR, "Unable to register init function "
			"for download client = %d\n", ret);
		goto unregister_misc_device;
	}
	init_waitqueue_head(&download_wq);
	atomic_set(&m4_dlcmd_resp_ready, false);
	atomic_set(&download_client_entry, 0);

	KDEBUG(M4SH_INFO, "Initialized %s driver\n",
		DOWNLOAD_CLIENT_DRIVER_NAME);
	return 0;

unregister_misc_device:
	misc_download_data = NULL;
	misc_deregister(&download_client_miscdrv);
free_memory:
	platform_set_drvdata(pdev, NULL);
	download_client_data->m4sensorhub = NULL;
	kfree(download_client_data);
	download_client_data = NULL;
	return ret;
}
开发者ID:AlmightyMegadeth00,项目名称:kernel_minnow,代码行数:51,代码来源:m4sensorhub_download.c


示例6: KDEBUG

void Pen::mousePressEvent(QMouseEvent *e)
{
  int x,y;
  QPainter painter1;
  QPainter painter2;
  QWMatrix m;

  KDEBUG(KDEBUG_INFO, 3000, "Pen::mousePressEvent() handler called\n");
  
  if (isActive()) {
    if (drawing) {
      KDEBUG(KDEBUG_INFO, 3000, "Pen: Warning button press received while drawing\n");
    }
    x= (e->pos()).x();
    y= (e->pos()).y();
    activeButton= e->button();

    m.scale((float) 100/(canvas->zoom()), (float) 100/(canvas->zoom()));

    painter1.begin(canvas->pixmap());

    if (activeButton == LeftButton)
      painter1.setPen(leftpen);
    else
      painter1.setPen(rightpen);
    painter1.setWorldMatrix(m);

    painter2.begin(canvas->zoomedPixmap());

    if (activeButton == LeftButton)
      painter2.setPen(leftpen);
    else
      painter2.setPen(rightpen);

    painter1.drawPoint(x, y);
    painter2.drawPoint(x, y);

    painter1.end();
    painter2.end();

    canvas->repaint(0);
    lastx= x;
    lasty= y;
    drawing= TRUE;
  } 
  if (!isActive()) {
    KDEBUG(KDEBUG_WARN, 3000, "Warning event received when inactive (ignoring)\n");
  }
}
开发者ID:kthxbyte,项目名称:KDE1-Linaro,代码行数:49,代码来源:pen.cpp


示例7: wait_for_not_BSY

/*
 * wait for access to IDE registers
 */
static int wait_for_not_BSY(volatile struct IDE *interface,LONG timeout)
{
    LONG next = hz_200 + timeout;

    KDEBUG(("wait_for_not_BSY(0x%08lx, %ld)\n", (ULONG)interface, timeout));

    DELAY_400NS;
    while(hz_200 < next) {
        if ((IDE_READ_ALT_STATUS() & IDE_STATUS_BSY) == 0)
            return 0;
    }

    KDEBUG(("Timeout in wait_for_not_BSY(%p,%ld)\n",interface,timeout));
    return 1;
}
开发者ID:kelihlodversson,项目名称:emutos,代码行数:18,代码来源:ide.c


示例8: display_client_open

static int display_client_open(struct inode *inode, struct file *file)
{
	int ret = -EFAULT;
	KDEBUG(M4SH_DEBUG, "%s:\n", __func__);
	if (global_display_data) {
		ret = nonseekable_open(inode, file);
		if (ret >= 0) {
			file->private_data = global_display_data;
			ret = 0;
		}
	}
	if (ret)
		KDEBUG(M4SH_ERROR, "%s: failed, err=%d\n", __func__, -ret);
	return ret;
}
开发者ID:AlmightyMegadeth00,项目名称:kernel_minnow,代码行数:15,代码来源:m4sensorhub_display.c


示例9: download_client_close

static int download_client_close(struct inode *inode, struct file *file)
{
	int entry = atomic_dec_return(&download_client_entry);
	file->private_data = NULL;
	KDEBUG(M4SH_DEBUG, "%s: entry = %d\n", __func__, entry);
	return 0;
}
开发者ID:AlmightyMegadeth00,项目名称:kernel_minnow,代码行数:7,代码来源:m4sensorhub_download.c


示例10: ach_ch_open

static int ach_ch_open(struct inode *inode, struct file *file)
{
    int ret = 0;
    struct ach_ch_device *device;

    /* Synchronize to protect refcounting */
    if (rt_mutex_lock_interruptible(&ctrl_data.lock)) {
        ret = -ERESTARTSYS;
        goto out;
    }

    device = &ctrl_data.devices[iminor(inode)];

    if (unlikely(device->minor != iminor(inode))) {
        printk(KERN_ERR "ach: Internal data problem\n");
        ret = -ERESTARTSYS;
        goto out_unlock;
    }

    file->private_data = ach_ch_file_alloc(device);

    if (!file->private_data) {
        printk(KERN_ERR "ach: Failed allocating file data\n");
        ret = -ENOBUFS;
        goto out_unlock;
    }

    KDEBUG( "ach: opened device %s\n", ach_ch_device_name(device) );

out_unlock:
    rt_mutex_unlock(&ctrl_data.lock);
out:
    return ret;
}
开发者ID:golems,项目名称:ach,代码行数:34,代码来源:ach_klinux.c


示例11: OSDynamicCast

void net_habitue_device_SC101::prepareAndDoAsyncReadWrite(OSData *addr, IOMemoryDescriptor *buffer, UInt32 block, UInt32 nblks, IOStorageCompletion completion)
{
  bool isWrite = (buffer->getDirection() == kIODirectionOut);
  const OSSymbol *ioMaxKey = (isWrite ? gSC101DeviceIOMaxWriteSizeKey : gSC101DeviceIOMaxReadSizeKey);
  UInt64 ioMaxSize = OSDynamicCast(OSNumber, getProperty(ioMaxKey))->unsigned64BitValue();
  UInt64 ioSize = (nblks * SECTOR_SIZE);
  
#if WRITEPROTECT
  if (isWrite)
    panic();
#endif

  if (ioSize > ioMaxSize || ioSize & (ioSize - 1))
  {
    KDEBUG("%s size=%llu, deblocking", (isWrite ? "write" : "read"), ioSize);
    deblock(addr, buffer, block, nblks, completion);
    return;
  }
  
  outstanding_io *io = IONewZero(outstanding_io, 1);
  io->addr = addr;
  io->buffer = buffer;
  io->block = block;
  io->nblks = nblks;
  io->completion = completion;
  io->attempt = 0;
  io->timeout_ms = getNextTimeoutMS(io->attempt, isWrite);
  
  io->addr->retain();
  
  getWorkLoop()->runAction(OSMemberFunctionCast(Action, this, &net_habitue_device_SC101::submitIO), this, io);
}
开发者ID:mastrogb,项目名称:sc101-iokit,代码行数:32,代码来源:SC101Device.cpp


示例12: m4pas_driver_init

static int m4pas_driver_init(struct init_calldata *p_arg)
{
	struct iio_dev *iio = p_arg->p_data;
	struct m4pas_driver_data *dd = iio_priv(iio);
	int err = 0;

	mutex_lock(&(dd->mutex));

	dd->m4 = p_arg->p_m4sensorhub_data;
	if (dd->m4 == NULL) {
		m4pas_err("%s: M4 sensor data is NULL.\n", __func__);
		err = -ENODATA;
		goto m4pas_driver_init_fail;
	}

	err = m4sensorhub_irq_register(dd->m4,
		M4SH_IRQ_PASSIVE_BUFFER_FULL, m4pas_isr, iio, 1);
	if (err < 0) {
		m4pas_err("%s: Failed to register M4 IRQ.\n", __func__);
		goto m4pas_driver_init_fail;
	}

	err = m4sensorhub_panic_register(dd->m4, PANICHDL_PASSIVE_RESTORE,
					 m4pas_panic_restore, dd);
	if (err < 0)
		KDEBUG(M4SH_ERROR, "Passive panic callback register failed\n");
	goto m4pas_driver_init_exit;

m4pas_driver_init_fail:
	m4pas_err("%s: Init failed with error code %d.\n", __func__, err);
m4pas_driver_init_exit:
	mutex_unlock(&(dd->mutex));
	return err;
}
开发者ID:AlmightyMegadeth00,项目名称:kernel_minnow,代码行数:34,代码来源:m4sensorhub_passive.c


示例13: m4_display_sync_clock

/* Sync M4 clock with current kernel time */
static int m4_display_sync_clock(void)
{
	int retry = 0;
	do {
		u32 m4_time = m4_display_get_clock();
		u32 kernel_time = m4_display_get_kernel_clock();
		u32 diff_time = m4_time > kernel_time \
			? m4_time-kernel_time : kernel_time-m4_time;
#ifdef	DEBUG_CLOCK
		print_time("M4 :", m4_time);
		print_time("KNL:", kernel_time);
#endif
		/* it needs adjust M4 time if different large than 1 second */
		if (diff_time < 2) {
			if (retry) {
				print_time("Synced M4 clock to", m4_time);
				m4_notify_clock_change();
			}
			return 0;
		}
		m4_display_set_clock(kernel_time);
	} while (retry++ < SYNC_CLOCK_RETRY_TIMES);
	KDEBUG(M4SH_ERROR, "%s: Failed to sync M4 clock!\n",  __func__);
	return -EIO;
}
开发者ID:AlmightyMegadeth00,项目名称:kernel_minnow,代码行数:26,代码来源:m4sensorhub_display.c


示例14: do_spi_erase

// uiAddr = addr
static int do_spi_erase(unsigned int  addr, unsigned int uiChip)
{
	unsigned int uiRet;
	uiRet = spi_flash_info[uiChip].pfErase(uiChip, addr);
	KDEBUG("do_spi_erase: addr=%x;\n", addr);
	return 0;
}
开发者ID:ClarkChen633,项目名称:rtl819x-toolchain,代码行数:8,代码来源:spi_flash.c


示例15: do_spi_read

// uiAddr = from; pucBuffer = to; uiLen = size
static unsigned int do_spi_read(unsigned int from, unsigned int to, unsigned int size, unsigned int uiChip)
{
	unsigned int uiRet;
	uiRet = spi_flash_info[uiChip].pfRead(uiChip, from, size, (unsigned char*)to);
	KDEBUG("do_spi_read: from=%x; to=%x; size=%x; uiRet=%x\n", from, to, size, uiRet);
	return 0;
}
开发者ID:ClarkChen633,项目名称:rtl819x-toolchain,代码行数:8,代码来源:spi_flash.c


示例16: ns_net_rx

void ns_net_rx(struct sk_buff *skb, struct net_device *dev)
{
   struct nano_pci_card *card = (struct nano_pci_card *)dev;

   if(down_interruptible(&card->sem)) {
      kfree_skb(skb);
      return;
   }

   if(skb_queue_len(&card->rx_queue)>300) {
      up(&card->sem);
      KDEBUG(ERROR, "more then 300 pkt's in rx queue; dropping frame of size %d",skb->len);
      kfree_skb(skb);
      return;
   }

   if(!test_bit(DEVST_OPEN, &card->devst)) {
      kfree_skb(skb);
      up(&card->sem);
      return;
   }

   skb_queue_tail(&card->rx_queue, skb);
   up(&card->sem);
   card->status.irq_count++;
   wake_up_interruptible(&card->rx_waitqueue);
   return;
}
开发者ID:CoreTech-Development,项目名称:buildroot-linux-kernel-m3,代码行数:28,代码来源:nano_pci_cdev.c


示例17: spi_block_erase

// SPI Flash Erase Block
unsigned int spi_block_erase(unsigned int uiChip, unsigned int uiAddr)
{
	KDEBUG("spi_block_erase: uiChip=%x; uiAddr=%x\n", uiChip, uiAddr);
	unsigned int uiRet;
	uiRet = ComSrlCmd_BE(uiChip, uiAddr);
	return uiRet;
}
开发者ID:appleorange1,项目名称:asus-rt-n12-lx,代码行数:8,代码来源:spi_flash.c


示例18: ComSrlCmd_CE

// Chip Erase (CE) Sequence (Command 60 or C7)
unsigned int ComSrlCmd_CE(unsigned char ucChip)
{
	SeqCmd_Order(ucChip,  IOWIDTH_SINGLE, SPICMD_WREN);
	SeqCmd_Order(ucChip,  IOWIDTH_SINGLE, SPICMD_CE);	
	KDEBUG("ComSrlCmd_CE: ucChip=%x; SPICMD_CE=%x\n", ucChip, SPICMD_CE);
	return spiFlashReady(ucChip);
}
开发者ID:jhbsz,项目名称:DIR-850L_A1,代码行数:8,代码来源:spi_common.c


示例19: ComSrlCmd_BE

// Block Erase (BE) Sequence (Command D8)
unsigned int ComSrlCmd_BE(unsigned char ucChip, unsigned int uiAddr)
{
	SeqCmd_Order(ucChip,  IOWIDTH_SINGLE, SPICMD_WREN);
	SeqCmd_Write(ucChip,  IOWIDTH_SINGLE, SPICMD_BE, uiAddr, 3);	
	KDEBUG("ComSrlCmd_BE: ucChip=%x; uiBlock=%x; uiBlockSize=%x; SPICMD_BE=%x\n", ucChip, uiAddr, spi_flash_info[ucChip].block_size, SPICMD_BE);
	return spiFlashReady(ucChip);
}
开发者ID:jhbsz,项目名称:DIR-850L_A1,代码行数:8,代码来源:spi_common.c


示例20: ComSrlCmd_SE

// Sector Erase (SE) Sequence (Command 20)
unsigned int ComSrlCmd_SE(unsigned char ucChip, unsigned int uiAddr)
{
	SeqCmd_Order(ucChip,  IOWIDTH_SINGLE, SPICMD_WREN);
	SeqCmd_Write(ucChip,  IOWIDTH_SINGLE, SPICMD_SE, uiAddr, 3);
	KDEBUG("ComSrlCmd_SE: ucChip=%x; uiSector=%x; uiSectorSize=%x; SPICMD_SE=%x\n", ucChip, uiAddr, spi_flash_info[ucChip].sector_size, SPICMD_SE);	
	return spiFlashReady(ucChip);
}
开发者ID:jhbsz,项目名称:DIR-850L_A1,代码行数:8,代码来源:spi_common.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ KDPrintM函数代码示例发布时间:2022-05-30
下一篇:
C++ KDASSERT函数代码示例发布时间: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