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


C++ A_FREE函数代码示例

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


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

示例1: ncvarget

int
ncvarget(
    int		ncid,
    int		varid,
    const long*	start,
    const long*	count, 
    void*	value
)
{
	NDIMS_DECL
	A_DECL(stp, size_t, ndims, start);
	A_DECL(cntp, size_t, ndims, count);
	A_INIT(stp, size_t, ndims, start);
	A_INIT(cntp, size_t, ndims, count);
	{
	const int status = nc_get_vara(ncid, varid, stp, cntp, value);
	A_FREE(cntp);
	A_FREE(stp);
	if(status != NC_NOERR)
	{
		nc_advise("ncvarget", status, "ncid %d; varid %d", ncid, varid);
		return -1;
	}
	}
	return 0;
}
开发者ID:stcorp,项目名称:harp,代码行数:26,代码来源:v2i.c

示例2: HTCCleanup

/* cleanup the HTC instance */
static void HTCCleanup(HTC_TARGET *target)
{
    A_INT32 i;

    DevCleanup(&target->Device);
    
    for (i = 0;i < NUM_CONTROL_BUFFERS;i++) {
        if (target->HTCControlBuffers[i].Buffer) {
            A_FREE(target->HTCControlBuffers[i].Buffer);
        }
    }
    
    if (A_IS_MUTEX_VALID(&target->HTCLock)) {
        A_MUTEX_DELETE(&target->HTCLock);
    }

    if (A_IS_MUTEX_VALID(&target->HTCRxLock)) {
        A_MUTEX_DELETE(&target->HTCRxLock);
    }

    if (A_IS_MUTEX_VALID(&target->HTCTxLock)) {
        A_MUTEX_DELETE(&target->HTCTxLock);
    }
        /* free our instance */
    A_FREE(target);
}
开发者ID:NemProjects,项目名称:WLAN,代码行数:27,代码来源:htc.c

示例3: BMIDone

A_STATUS
BMIDone(A_VOID *pCxt)
{
    A_STATUS status;
    A_UINT32 cid;

    if (bmiDone) {
        return A_OK;
    }

    bmiDone = TRUE;
    cid = A_CPU2LE32(BMI_DONE);

    status = bmiBufferSend(pCxt, (A_UCHAR *)&cid, sizeof(cid));
    if (status != A_OK) {
        return A_ERROR;
    }

    if (pBMICmdCredits) {
        A_FREE(pBMICmdCredits, MALLOC_ID_TEMPORARY);
        pBMICmdCredits = NULL;
    }

    if (pBMICmdBuf) {
        A_FREE(pBMICmdBuf, MALLOC_ID_TEMPORARY);
        pBMICmdBuf = NULL;
    }

    return A_OK;
}
开发者ID:BillyZhangZ,项目名称:wifi,代码行数:30,代码来源:bmi.c

示例4: CleanupHIFScatterResources

    /* clean up scatter support */
void CleanupHIFScatterResources(HIF_DEVICE *device)
{
    HIF_SCATTER_REQ_PRIV    *pReqPriv;
    HIF_SCATTER_REQ         *pReq;
    
        /* empty the free list */
        
    while (1) {
        
        pReq = AllocScatterReq(device);
                
        if (NULL == pReq) {
            break;    
        }   
        
        pReqPriv = (HIF_SCATTER_REQ_PRIV *)pReq->HIFPrivate[0];
        A_ASSERT(pReqPriv != NULL);
        
        if (pReqPriv->busrequest != NULL) {
            pReqPriv->busrequest->pScatterReq = NULL;
                /* free bus request */
            hifFreeBusRequest(device, pReqPriv->busrequest);
            pReqPriv->busrequest = NULL;
        }
        
        if (pReqPriv->pHifScatterReq != NULL) {
            A_FREE(pReqPriv->pHifScatterReq);   
            pReqPriv->pHifScatterReq = NULL; 
        }
                
        A_FREE(pReqPriv);       
    }
}
开发者ID:ANFS,项目名称:ANFS-kernel,代码行数:34,代码来源:hif_scatter.c

示例5: BMIDone

int
BMIDone(struct hif_device *device)
{
    int status;
    u32 cid;

    if (bmiDone) {
        AR_DEBUG_PRINTF (ATH_DEBUG_BMI, ("BMIDone skipped\n"));
        return 0;
    }

    AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Done: Enter (device: 0x%p)\n", device));
    bmiDone = true;
    cid = BMI_DONE;

    status = bmiBufferSend(device, (u8 *)&cid, sizeof(cid));
    if (status) {
        AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to write to the device\n"));
        return A_ERROR;
    }

    if (pBMICmdCredits) {
        A_FREE(pBMICmdCredits);
        pBMICmdCredits = NULL;
    }

    if (pBMICmdBuf) {
        A_FREE(pBMICmdBuf);
        pBMICmdBuf = NULL;
    }

    AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Done: Exit\n"));

    return 0;
}
开发者ID:ARMP,项目名称:android_kernel_lge_x3,代码行数:35,代码来源:bmi.c

示例6: ar6000_cleanup_hci

void  ar6000_cleanup_hci(AR_SOFTC_T *ar)
#endif
{
#ifdef EXPORT_HCI_BRIDGE_INTERFACE
    AR6K_HCI_BRIDGE_INFO *pHcidevInfo = g_pHcidevInfo;
#else
    AR6K_HCI_BRIDGE_INFO *pHcidevInfo = (AR6K_HCI_BRIDGE_INFO *)ar->hcidev_info;
#endif
    
    if (pHcidevInfo != NULL) {
        bt_cleanup_hci(pHcidevInfo);   
        
        if (pHcidevInfo->pHCIDev != NULL) {
            HCI_TransportStop(pHcidevInfo->pHCIDev);
            HCI_TransportDetach(pHcidevInfo->pHCIDev);
            pHcidevInfo->pHCIDev = NULL;
        } 
        
        if (pHcidevInfo->pHTCStructAlloc != NULL) {
            A_FREE(pHcidevInfo->pHTCStructAlloc);
            pHcidevInfo->pHTCStructAlloc = NULL;    
        }
        
        A_FREE(pHcidevInfo);
#ifndef EXPORT_HCI_BRIDGE_INTERFACE
        ar->hcidev_info = NULL;
        ar->exitCallback = NULL;
#endif
    }
    
    
}
开发者ID:dalingrin,项目名称:android_system_wlan_atheros,代码行数:32,代码来源:hci_bridge.c

示例7: ncvargets

int
ncvargets(
    int		ncid,
    int		varid,
    const long*	start,
    const long*	count,
    const long*	stride,
    void*	value
)
{
	if(stride == NULL)
		return ncvarget(ncid, varid, start, count, value);
	/* else */
	{
	NDIMS_DECL
	A_DECL(stp, size_t, ndims, start);
	A_DECL(cntp, size_t, ndims, count);
	A_DECL(strdp, ptrdiff_t, ndims, stride);
	A_INIT(stp, size_t, ndims, start);
	A_INIT(cntp, size_t, ndims, count);
	A_INIT(strdp, ptrdiff_t, ndims, stride);
	{
	const int status = nc_get_vars(ncid, varid, stp, cntp, strdp, value);
	A_FREE(strdp);
	A_FREE(cntp);
	A_FREE(stp);
	if(status != NC_NOERR)
	{
		nc_advise("ncvargets", status, "ncid %d", ncid);
		return -1;
	}
	}
	return 0;
	}
}
开发者ID:stcorp,项目名称:harp,代码行数:35,代码来源:v2i.c

示例8: wlan_node_free

void
wlan_node_free(bss_t *ni)
{
    if (ni->ni_buf != NULL) {
        A_FREE(ni->ni_buf);
    }
    A_FREE(ni);
}
开发者ID:ArthySundaram,项目名称:firstrepo,代码行数:8,代码来源:wlan_node.c

示例9: hif_usb_remove

static void hif_usb_remove(struct usb_interface *interface)
{
	HIF_DEVICE_USB *device = usb_get_intfdata(interface);
	struct hif_usb_softc *sc = device->sc;
	struct ol_softc *scn;

	/* Attach did not succeed, all resources have been
	 * freed in error handler
	 */
	if (!sc)
		return;
	/* wait __hdd_wlan_exit until finished and no more than 4 seconds*/
	while(usb_sc->hdd_removed_processing == 1 &&
			usb_sc->hdd_removed_wait_cnt < 20) {
		set_current_state(TASK_INTERRUPTIBLE);
		schedule_timeout(msecs_to_jiffies(DELAY_INT_FOR_HDD_REMOVE));
		set_current_state(TASK_RUNNING);
		usb_sc->hdd_removed_wait_cnt ++;
	}
	/* do cold reset */
	HIFDiagWriteCOLDRESET(sc->hif_device);
	/* wait for target jump to boot code and finish the initialization */
	set_current_state(TASK_INTERRUPTIBLE);
	schedule_timeout(msecs_to_jiffies(DELAY_FOR_TARGET_READY));
	set_current_state(TASK_RUNNING);
	if (usb_sc->local_state.event != 0) {
		hif_usb_resume(usb_sc->interface);
		usb_sc->local_state.event = 0;
	}
	unregister_reboot_notifier(&sc->reboot_notifier);
	usb_put_dev(interface_to_usbdev(interface));
	if (atomic_read(&hif_usb_unload_state) ==
			HIF_USB_UNLOAD_STATE_DRV_DEREG)
		atomic_set(&hif_usb_unload_state,
			   HIF_USB_UNLOAD_STATE_TARGET_RESET);
	scn = sc->ol_sc;

	if (usb_sc->hdd_removed == 0) {
		usb_sc->hdd_removed_processing = 1;
#ifndef REMOVE_PKT_LOG
	if (vos_get_conparam() != VOS_FTM_MODE &&
		!WLAN_IS_EPPING_ENABLED(vos_get_conparam()))
		pktlogmod_exit(scn);
#endif
		__hdd_wlan_exit();
		usb_sc->hdd_removed_processing = 0;
		usb_sc->hdd_removed = 1;
	}
	hif_nointrs(sc);
	HIF_USBDeviceDetached(interface, 1);
	A_FREE(scn);
	A_FREE(sc);
	usb_sc = NULL;
	pr_info("hif_usb_remove!!!!!!\n");
}
开发者ID:benschhold,项目名称:android_kernel_oneplus_msm8994_custom,代码行数:55,代码来源:if_usb.c

示例10: BMICleanup

void
BMICleanup(void)
{
    if (pBMICmdCredits) {
        A_FREE(pBMICmdCredits);
        pBMICmdCredits = NULL;
    }

    if (pBMICmdBuf) {
        A_FREE(pBMICmdBuf);
        pBMICmdBuf = NULL;
    }
}
开发者ID:ARMP,项目名称:android_kernel_lge_x3,代码行数:13,代码来源:bmi.c

示例11: BMICleanup

void
BMICleanup(void)
{
    if (pBMICmdCredits) {
        A_FREE(pBMICmdCredits, MALLOC_ID_TEMPORARY);
        pBMICmdCredits = NULL;
    }

    if (pBMICmdBuf) {
        A_FREE(pBMICmdBuf, MALLOC_ID_TEMPORARY);
        pBMICmdBuf = NULL;
    }
}
开发者ID:BillyZhangZ,项目名称:wifi,代码行数:13,代码来源:bmi.c

示例12: BMICleanup

void
BMICleanup(void)
{
#if 0
    if (pBMICmdCredits) {
        A_FREE(pBMICmdCredits);
        pBMICmdCredits = NULL;
    }
#endif

    if (pBMICmdBuf) {
        A_FREE(pBMICmdBuf);
        pBMICmdBuf = NULL;
    }
}
开发者ID:fread-ink,项目名称:fread-kernel-k4,代码行数:15,代码来源:bmi.c

示例13: wlan_node_free

void
wlan_node_free(bss_t *ni)
{
    if (ni->ni_buf != NULL) {
        A_FREE(ni->ni_buf);
        ni->ni_buf = NULL;
    }
#ifdef P2P
    if (ni->p2p_dev) {
        p2p_device_free(ni->p2p_dev);
    }
#endif /* P2P */
    A_FREE(ni);
    ni = NULL;
}
开发者ID:ShawnOfMisfit,项目名称:ambarella,代码行数:15,代码来源:wlan_node.c

示例14: cmp_model_reload

void cmp_model_reload(const char* filepath, reshandle_t hdl, int manual)
{
    reshandle_t nhdl;
    uint cnt;
    struct allocator* tmp_alloc = tsk_get_tmpalloc(0);
    cmp_t c = cmp_findtype(cmp_model_type);
    const struct cmp_instance_desc** insts = cmp_get_allinstances(c, &cnt, tmp_alloc);

    /* reload model and refresh all model component data */
    cmp_model_destroyinstances(hdl, insts, cnt);

    if (!manual)
        nhdl = rs_load_model(filepath, RS_LOAD_REFRESH);
    else
        nhdl = hdl;

    if (nhdl != INVALID_HANDLE) {
        if (rs_get_model(nhdl) != NULL)
            cmp_model_rebuildhinstances(eng_get_dataalloc(), tmp_alloc, hdl, insts, cnt);
        else
            cmp_model_clearinstances(hdl, insts, cnt, FALSE);
    }    else   {
        cmp_model_clearinstances(hdl, insts, cnt, TRUE);  /* this happens when model-reload fails
                                                             we have to invalidate handles */
    }

    A_FREE(tmp_alloc, insts);
}
开发者ID:septag,项目名称:darkhammer,代码行数:28,代码来源:cmp-model.c

示例15: A_MEMZERO

static HTC_PACKET *BuildHTCTxCtrlPacket(adf_os_device_t osdev)
{
    HTC_PACKET *pPacket = NULL;
    adf_nbuf_t netbuf;

    do {
        pPacket = (HTC_PACKET *)A_MALLOC(sizeof(HTC_PACKET));
        if (NULL == pPacket) {
            break;
        }
        A_MEMZERO(pPacket,sizeof(HTC_PACKET));
#ifdef ATH_USE_NCNB
        netbuf = adf_nbuf_alloc_ncnb(osdev, HTC_CONTROL_BUFFER_SIZE, 20, 4, TRUE);
#else
        netbuf = adf_nbuf_alloc(osdev, HTC_CONTROL_BUFFER_SIZE, 20, 4, TRUE);
#endif
        if (NULL == netbuf) {
            A_FREE(pPacket);
            pPacket = NULL;
	        adf_os_print("%s: nbuf alloc failed\n",__func__);
            break;
        }
        AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("alloc ctrl netbuf :0x%p \n", netbuf));
        SET_HTC_PACKET_NET_BUF_CONTEXT(pPacket, netbuf);
    } while (FALSE);

    return pPacket;
}
开发者ID:KHATEEBNSIT,项目名称:AP,代码行数:28,代码来源:htc.c


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