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


C++ DBG_LEAVE函数代码示例

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


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

示例1: PGPnetPMNewSA

NDIS_STATUS
PGPnetPMNewSA(PGPnetPMContext *pContext, 
			  void *data, 
			  UINT dataLen, 
			  ULONG *pSrcBufferLen)
{
    DBG_FUNC("PGPnetPMNewSA")

    DBG_ENTER();

	*pSrcBufferLen = sizeof(PGPikeSA);

	if (dataLen != *pSrcBufferLen) {
		DBG_LEAVE(NDIS_STATUS_INVALID_LENGTH);
		return NDIS_STATUS_INVALID_LENGTH;
	}

	if (!PMAddSA(pContext, (PGPikeSA*) data)) {
		DBG_LEAVE(NDIS_STATUS_FAILURE);
		return NDIS_STATUS_FAILURE;
	}

	*pSrcBufferLen = 0;
    DBG_LEAVE(NDIS_STATUS_SUCCESS);
	return NDIS_STATUS_SUCCESS;
}
开发者ID:ysangkok,项目名称:pgp-win32-6.5.8,代码行数:26,代码来源:pgpNetPMCommands.c

示例2: PGPnetPMFailedSA

NDIS_STATUS
PGPnetPMFailedSA(PGPnetPMContext *pContext, 
				 void *data,
				 UINT dataLen,
				 ULONG *pSrcBufferLen)
{
    DBG_FUNC("PGPnetPMFailedSA")

	PGPikeMTSAFailed * pSAFailed = (PGPikeMTSAFailed*)data;

    DBG_ENTER();

	*pSrcBufferLen = sizeof(PGPikeMTSAFailed);

	if (dataLen != *pSrcBufferLen) {
		DBG_LEAVE(NDIS_STATUS_INVALID_LENGTH);
		return NDIS_STATUS_INVALID_LENGTH;
	}

	PMRemovePendingSA(pContext, pSAFailed->ipAddress,
		pSAFailed->u.ipsec.ipAddrStart,
		pSAFailed->u.ipsec.ipMaskEnd);

	*pSrcBufferLen = 0;
    DBG_LEAVE(NDIS_STATUS_SUCCESS);
	return NDIS_STATUS_SUCCESS;
}
开发者ID:ysangkok,项目名称:pgp-win32-6.5.8,代码行数:27,代码来源:pgpNetPMCommands.c

示例3: DBG_ENTER

/**
 * et131x_device_alloc
 *
 * Returns pointer to the allocated and initialized net_device struct for
 * this device.
 *
 * Create instances of net_device and wl_private for the new adapter and
 * register the device's entry points in the net_device structure.
 */
struct net_device *et131x_device_alloc(void)
{
	struct net_device *netdev;

	DBG_ENTER(et131x_dbginfo);

	/* Alloc net_device and adapter structs */
	netdev = alloc_etherdev(sizeof(struct et131x_adapter));

	if (netdev == NULL) {
		DBG_ERROR(et131x_dbginfo,
			  "Alloc of net_device struct failed\n");
		DBG_LEAVE(et131x_dbginfo);
		return NULL;
	}

	/* Setup the function registration table (and other data) for a
	 * net_device
	 */
	//netdev->init               = &et131x_init;
	//netdev->set_config = &et131x_config;
	netdev->watchdog_timeo = ET131X_TX_TIMEOUT;
	netdev->netdev_ops = &et131x_netdev_ops;

	//netdev->ethtool_ops        = &et131x_ethtool_ops;

	// Poll?
	//netdev->poll               = &et131x_poll;
	//netdev->poll_controller    = &et131x_poll_controller;

	DBG_LEAVE(et131x_dbginfo);
	return netdev;
}
开发者ID:AppEngine,项目名称:linux-2.6,代码行数:42,代码来源:et131x_netdev.c

示例4: wl_adapter_open

/*******************************************************************************
 *	wl_adapter_open()
 *******************************************************************************
 *
 *  DESCRIPTION:
 *
 *      Open the device.
 *
 *  PARAMETERS:
 *
 *      dev - a pointer to a net_device structure representing the network
 *            device to open.
 *
 *  RETURNS:
 *
 *      0 on success
 *      errno value otherwise
 *
 ******************************************************************************/
int wl_adapter_open(struct net_device *dev)
{
	struct wl_private *lp = wl_priv(dev);
	struct pcmcia_device *link = lp->link;
	int result = 0;
	int hcf_status = HCF_SUCCESS;
	/*--------------------------------------------------------------------*/

	DBG_FUNC("wl_adapter_open");
	DBG_ENTER(DbgInfo);
	DBG_PRINT("%s\n", VERSION_INFO);
	DBG_PARAM(DbgInfo, "dev", "%s (0x%p)", dev->name, dev);

	if (!pcmcia_dev_present(link)) {
		DBG_LEAVE(DbgInfo);
		return -ENODEV;
	}

	link->open++;

	hcf_status = wl_open(dev);

	if (hcf_status != HCF_SUCCESS) {
		link->open--;
		result = -ENODEV;
	}

	DBG_LEAVE(DbgInfo);
	return result;
} /* wl_adapter_open */
开发者ID:0xroot,项目名称:Blackphone-BP1-Kernel,代码行数:49,代码来源:wl_cs.c

示例5: PGPnetPMNewHost

NDIS_STATUS
PGPnetPMNewHost(PGPnetPMContext *context, 
				void *data,
				UINT dataLen,
				ULONG *pSrcBufferLen)
{
    DBG_FUNC("PGPnetPMNewHost")

    DBG_ENTER();

	*pSrcBufferLen = sizeof(PGPNetHostEntry) - 8; /* minus 8 bytes for eth_dstAddress */

	if (dataLen != *pSrcBufferLen) {
		DBG_LEAVE(NDIS_STATUS_INVALID_LENGTH);
		return NDIS_STATUS_INVALID_LENGTH;
	}

	if (!PMAddHost(context, (PGPNetHostEntry*) data)) {
		DBG_LEAVE(NDIS_STATUS_FAILURE);
		return NDIS_STATUS_FAILURE;
	}

	*pSrcBufferLen = 0;
	DBG_LEAVE(NDIS_STATUS_SUCCESS);
	return NDIS_STATUS_SUCCESS;
}
开发者ID:ysangkok,项目名称:pgp-win32-6.5.8,代码行数:26,代码来源:pgpNetPMCommands.c

示例6: wl_adapter_insert

void wl_adapter_insert(struct pcmcia_device *link)
{
	struct net_device *dev;
	int i;
	int ret;
	/*--------------------------------------------------------------------*/

	DBG_FUNC("wl_adapter_insert");
	DBG_ENTER(DbgInfo);
	DBG_PARAM(DbgInfo, "link", "0x%p", link);

	dev     = link->priv;

	/* Do we need to allocate an interrupt? */
	link->config_flags |= CONF_ENABLE_IRQ;
	link->io_lines = 6;

	ret = pcmcia_request_io(link);
	if (ret != 0)
		goto failed;

	ret = pcmcia_request_irq(link, (void *) wl_isr);
	if (ret != 0)
		goto failed;

	ret = pcmcia_enable_device(link);
	if (ret != 0)
		goto failed;

	dev->irq        = link->irq;
	dev->base_addr  = link->resource[0]->start;

	SET_NETDEV_DEV(dev, &link->dev);
	if (register_netdev(dev) != 0) {
;
		goto failed;
	}

	register_wlags_sysfs(dev);

//	printk(KERN_INFO "%s: Wireless, io_addr %#03lx, irq %d, ""mac_address ",
;
	for (i = 0; i < ETH_ALEN; i++)
;

	DBG_LEAVE(DbgInfo);
	return;

failed:
	wl_adapter_release(link);

	DBG_LEAVE(DbgInfo);
	return;
} /* wl_adapter_insert */
开发者ID:nos1609,项目名称:Chrono_Kernel-1,代码行数:54,代码来源:wl_cs.c

示例7: wl_adapter_insert

void wl_adapter_insert( struct pcmcia_device *link )
{
    struct net_device       *dev;
    int i;
    int                     ret;
    /*------------------------------------------------------------------------*/

    DBG_FUNC( "wl_adapter_insert" );
    DBG_ENTER( DbgInfo );
    DBG_PARAM( DbgInfo, "link", "0x%p", link );

    dev     = link->priv;

    /* Do we need to allocate an interrupt? */
    link->conf.Attributes |= CONF_ENABLE_IRQ;

    ret = pcmcia_request_io(link, &link->io);
    if (ret != 0)
        goto failed;

    ret = pcmcia_request_irq(link, (void *) wl_isr);
    if (ret != 0)
        goto failed;

    ret = pcmcia_request_configuration(link, &link->conf);
    if (ret != 0)
        goto failed;

    dev->irq        = link->irq;
    dev->base_addr  = link->io.BasePort1;

    SET_NETDEV_DEV(dev, &link->dev);
    if (register_netdev(dev) != 0) {
	printk("%s: register_netdev() failed\n", MODULE_NAME);
	goto failed;
    }

    register_wlags_sysfs(dev);

    printk(KERN_INFO "%s: Wireless, io_addr %#03lx, irq %d, ""mac_address ",
               dev->name, dev->base_addr, dev->irq);
    for( i = 0; i < ETH_ALEN; i++ ) {
        printk("%02X%c", dev->dev_addr[i], ((i < (ETH_ALEN-1)) ? ':' : '\n'));
    }

    DBG_LEAVE( DbgInfo );
    return;

failed:
    wl_adapter_release( link );

    DBG_LEAVE(DbgInfo);
    return;
} // wl_adapter_insert
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:54,代码来源:wl_cs.c

示例8: DispatchCreate

//
// DispatchCreate():
//
// This is the Add Device dispatch for the capture device.  It creates
// the CCaptureDevice and associates it with the device via the bag.
//
NTSTATUS
CAvsCameraDevice::
DispatchCreate (
    _In_ PKSDEVICE Device
)
{
    PAGED_CODE();

    DBG_ENTER("()");

    CAvsCameraDevice *CapDevice = new (NonPagedPoolNx, 'eviD') CAvsCameraDevice (Device);
    if( !CapDevice)
    {
        //
        //  Return failure if we couldn't create the device.
        //
        return STATUS_INSUFFICIENT_RESOURCES;
    }

    NTSTATUS Status = CapDevice->Prepare();
    if (!NT_SUCCESS (Status))
    {
        //  Init failure.
        delete CapDevice;
    }

    DBG_LEAVE("()");
    return Status;
}
开发者ID:0xhack,项目名称:Windows-driver-samples,代码行数:35,代码来源:AvsCameraDevice.cpp

示例9: et131x_close

/**
 * et131x_close - Close the device
 * @netdev: device to be closed
 *
 * Returns 0 on success, errno on failure (as defined in errno.h)
 */
int et131x_close(struct net_device *netdev)
{
	struct et131x_adapter *adapter = netdev_priv(netdev);

	DBG_ENTER(et131x_dbginfo);

	/* First thing is to stop the queue */
	netif_stop_queue(netdev);

	/* Stop the Tx and Rx DMA engines */
	et131x_rx_dma_disable(adapter);
	et131x_tx_dma_disable(adapter);

	/* Disable device interrupts */
	et131x_disable_interrupts(adapter);

	/* Deregistering ISR */
	MP_CLEAR_FLAG(adapter, fMP_ADAPTER_INTERRUPT_IN_USE);

	DBG_TRACE(et131x_dbginfo, "Deregistering ISR...\n");
	free_irq(netdev->irq, netdev);

	/* Stop the error timer */
	del_timer_sync(&adapter->ErrorTimer);

	DBG_LEAVE(et131x_dbginfo);
	return 0;
}
开发者ID:AppEngine,项目名称:linux-2.6,代码行数:34,代码来源:et131x_netdev.c

示例10: DispatchQueryPower

NTSTATUS
CCaptureDevice::
DispatchQueryPower(
    _In_ PKSDEVICE Device,
    _In_ PIRP Irp,
    _In_ DEVICE_POWER_STATE DeviceTo,
    _In_ DEVICE_POWER_STATE DeviceFrom,
    _In_ SYSTEM_POWER_STATE SystemTo,
    _In_ SYSTEM_POWER_STATE SystemFrom,
    _In_ POWER_ACTION Action
)
{
    //  If this device supports the the DO_POWER_INRUSH flag, this function
    //  can be called at DISPATCH.

    DBG_ENTER("()");
    NTSTATUS Status =
        Recast(Device)->
        PnpQueryPower(
            Irp,
            DeviceTo,
            DeviceFrom,
            SystemTo,
            SystemFrom,
            Action );

    DBG_LEAVE("()=0x%08X", Status);
    return Status;
}
开发者ID:Wesley-Lin,项目名称:Windows-driver-samples,代码行数:29,代码来源:Device.cpp

示例11: IsPfsEOS

//  Function:
//      bool CImageHardwareSimulation::IsPfsEOS(void)
//
//  Description:
//      Determine if we're at the EOS.
//
//  Parameters:
//      [None]
//
//  Returns:
//      bool - true if we've reached the end of our Per Frame Settings.
//
bool
CImageHardwareSimulation::
IsPfsEOS(void)
{
    PAGED_CODE();

    DBG_ENTER( "()" );
    DBG_TRACE( "m_bTriggered=%s, m_bEndOfSequence=%s, m_PinMode=%d, m_pIspSetting=0x%p",
               ( m_bTriggered ? "true" : "false" ),
               ( m_bEndOfSequence ? "true" : "false" ),
               m_PinMode,
               m_pIspSettings );

    //
    //  Make sure we're in a Variable Photo Sequence.
    //
    bool result =
        bool( m_bTriggered == TRUE &&
              m_bEndOfSequence &&
              m_PinMode == PinBurstMode &&
              m_pIspSettings );       // Must have ISP settings set to be PFS EOS.

    DBG_LEAVE( "() = %s", (result ? "true" : "false") );
    return result;
}
开发者ID:Wesley-Lin,项目名称:Windows-driver-samples,代码行数:37,代码来源:imagehwsim.cpp

示例12: wl_get_tallies

int wl_get_tallies(struct wl_private *lp,
		   CFG_HERMES_TALLIES_STRCT *tallies)
{
    int ret = 0;
    int status;
    CFG_HERMES_TALLIES_STRCT *pTallies;

    DBG_FUNC( "wl_get_tallies" );
    DBG_ENTER(DbgInfo);

    /* Get the current tallies from the adapter */
    lp->ltvRecord.len = 1 + HCF_TOT_TAL_CNT * sizeof(hcf_16);
    lp->ltvRecord.typ = CFG_TALLIES;

    status = hcf_get_info(&(lp->hcfCtx), (LTVP)&(lp->ltvRecord));

    if( status == HCF_SUCCESS ) {
	pTallies = (CFG_HERMES_TALLIES_STRCT *)&(lp->ltvRecord.u.u32);
	memcpy(tallies, pTallies, sizeof(*tallies));
	DBG_TRACE( DbgInfo, "Get tallies okay, dixe: %d\n", sizeof(*tallies) );
    } else {
	DBG_TRACE( DbgInfo, "Get tallies failed\n" );
	ret = -EFAULT;
    }

    DBG_LEAVE( DbgInfo );

    return ret;
}
开发者ID:adis1313,项目名称:android_kernel_samsung_msm8974,代码行数:29,代码来源:wl_util.c

示例13: GetTriggerMode

LONG
CImageHardwareSimulation::
GetTriggerMode()
/*++

Returns the pin's current trigger mode and state:

    Return Value:

    mode - 
        Normal trigger, start or stop photo sequence.
        
--*/

{
    PAGED_CODE();

    NTSTATUS status = STATUS_SUCCESS;
    LONG	 mode = 0;

    DBG_ENTER( "(), m_PinMode=%d", m_PinMode );

    KScopedMutex Lock( m_ListLock );

    if( m_bTriggered )
    {
        mode = (m_PinMode == PinBurstMode) ?
            KS_VideoControlFlag_StartPhotoSequenceCapture :
            KS_VideoControlFlag_Trigger;
    }

    DBG_LEAVE("()=0x%08X", mode);

    return mode;
}
开发者ID:Wesley-Lin,项目名称:Windows-driver-samples,代码行数:35,代码来源:imagehwsim.cpp

示例14: wl_adapter_attach

static int wl_adapter_attach(struct pcmcia_device *link)
{
    struct net_device   *dev;
    struct wl_private	*lp;
    /*------------------------------------------------------------------------*/

    DBG_FUNC( "wl_adapter_attach" );
    DBG_ENTER( DbgInfo );

    dev = wl_device_alloc();
    if(dev == NULL) {
        DBG_ERROR( DbgInfo, "wl_device_alloc returned NULL\n");
	return -ENOMEM;
    }

    link->io.NumPorts1      = HCF_NUM_IO_PORTS;
    link->io.Attributes1    = IO_DATA_PATH_WIDTH_16;
    link->io.IOAddrLines    = 6;
    link->conf.Attributes   = CONF_ENABLE_IRQ;
    link->conf.IntType      = INT_MEMORY_AND_IO;
    link->conf.ConfigIndex  = 5;
    link->conf.Present      = PRESENT_OPTION;

    link->priv = dev;
    lp = wl_priv(dev);
    lp->link = link;

    wl_adapter_insert(link);

    DBG_LEAVE( DbgInfo );
    return 0;
} // wl_adapter_attach
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:32,代码来源:wl_cs.c

示例15: PGPnetRASdisconnect

void
PGPnetRASdisconnect(PVPN_ADAPTER adapter)
{
	/* fire event */
	DBG_FUNC("PGPnetRASdisconnect")

	PGPMESSAGE_CONTEXT	*	kernelMessageContext;
	PGPnetMessageHeader *	kernelMessageHeader;
	PGPUInt32				head = 0;

	DBG_ENTER();

	if ((adapter != NULL) && (adapter->pgpMessage != NULL)) {
		kernelMessageContext = (PGPMESSAGE_CONTEXT*)(adapter->pgpMessage);
		kernelMessageHeader = &kernelMessageContext->header;
		
		NdisAcquireSpinLock(&adapter->general_lock);

		head = kernelMessageHeader->head + 1;

		if (head > kernelMessageHeader->maxSlots)
			head = 1;

		kernelMessageContext = &kernelMessageContext[head];
		kernelMessageContext->messageType = PGPnetMessageRASdisconnect;

		kernelMessageHeader->head = head;

		NdisReleaseSpinLock(&adapter->general_lock);

		PgpEventSet(&adapter->pgpEvent);
	}

	DBG_LEAVE(0);
}
开发者ID:ysangkok,项目名称:pgp-win32-6.5.8,代码行数:35,代码来源:pgpNetPolicyManager.c


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