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

C++ dlist_remove函数代码示例

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

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



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

示例1: sock_fab_remove_from_list

void sock_fab_remove_from_list(struct sock_fabric *fabric)
{
	fastlock_acquire(&sock_list_lock);
	if (sock_fab_check_list_internal(fabric))
		dlist_remove(&fabric->fab_list_entry);

	fastlock_release(&sock_list_lock);
}
开发者ID:lionkov,项目名称:libfabric,代码行数:8,代码来源:sock_fabric.c


示例2: rxd_release_unexp_entry

static inline void rxd_release_unexp_entry(struct rxd_cq *cq,
					    struct fi_cq_msg_entry *comp)
{
	struct rxd_unexp_cq_entry *unexp;
	unexp = container_of(comp, struct rxd_unexp_cq_entry, cq_entry);
	dlist_remove(&unexp->entry);
	util_buf_release(cq->unexp_pool, unexp);
}
开发者ID:a-abraham,项目名称:libfabric-cray,代码行数:8,代码来源:rxd_cq.c


示例3: remove_from_clients

/* FIXME */
static void remove_from_clients(client c) {
	dlist_node_t node;

	dlist_lock(clients);
	if ((node = dlist_find(clients, c)))
		dlist_remove(clients, node);
	dlist_unlock(clients);
}
开发者ID:lbustc,项目名称:xcube,代码行数:9,代码来源:xcb-dp2.c


示例4: sock_dom_remove_from_list

void sock_dom_remove_from_list(struct sock_domain *domain)
{
	fastlock_acquire(&sock_list_lock);
	if (sock_dom_check_list_internal(domain))
		dlist_remove(&domain->dom_list_entry);

	fastlock_release(&sock_list_lock);
}
开发者ID:lionkov,项目名称:libfabric,代码行数:8,代码来源:sock_fabric.c


示例5: remove_from_monitors

/* FIXME */
static void remove_from_monitors(client c) {
	dlist_node_t node;

	dlist_rwlock_wrlock(monitors);
	if ((node = dlist_find(monitors, c)))
		dlist_remove(monitors, node);
	dlist_rwlock_unlock(monitors);
}
开发者ID:lbustc,项目名称:xcube,代码行数:9,代码来源:xcb-dp2.c


示例6: ksystime_timer_stop_internal

void ksystime_timer_stop_internal(KTIMER* timer)
{
    if (timer->active)
    {
        dlist_remove((DLIST**)&__KERNEL->timers, (DLIST*)timer);
        timer->active = false;
    }
}
开发者ID:alexeyk13,项目名称:rexos,代码行数:8,代码来源:ksystime.c


示例7: __gnix_ht_delete_entry

static inline void __gnix_ht_delete_entry(gnix_ht_entry_t *ht_entry)
{
	dlist_remove(&ht_entry->entry);

	ht_entry->value = NULL;
	ht_entry->key = 0;
	free(ht_entry);
}
开发者ID:nrgraham23,项目名称:libfabric-cray,代码行数:8,代码来源:gnix_hashtable.c


示例8: uall_command

/* FIXME */
void uall_command(client c) {
	dstr res = get_indices();
	dstr *fields = NULL;
	int nfield = 0, i;

	RTRIM(res);
	fields = dstr_split_len(res, dstr_length(res), ",", 1, &nfield);
	for (i = 1; i < nfield; ++i) {
		dstr pkey = dstr_new(fields[i]);
		dstr skey = dstr_new(pkey);
		dlist_t dlist;

		table_rwlock_wrlock(subscribers);
		if ((dlist = table_get_value(subscribers, pkey))) {
			struct kvd *kvd;

			if (NEW(kvd)) {
				dlist_node_t node, node2;

				kvd->key = skey;
				if ((node = dlist_find(dlist, kvd))) {
					FREE(kvd);
					kvd = (struct kvd *)dlist_node_value(node);
					if ((node2 = dlist_find(kvd->u.dlist, c)))
						dlist_remove(kvd->u.dlist, node2);
					if (dlist_length(kvd->u.dlist) == 0) {
						dlist_remove(dlist, node);
						kdfree(kvd);
					}
					if (dlist_length(dlist) == 0) {
						table_remove(subscribers, pkey);
						dlist_free(&dlist);
					}
				} else
					FREE(kvd);
			} else
				add_reply_error(c, "error allocating memory for kvd");
		}
		table_rwlock_unlock(subscribers);
		dstr_free(skey);
		dstr_free(pkey);
	}
	add_reply_string(c, "\r\n", 2);
	dstr_free(res);
}
开发者ID:wangdkchina,项目名称:xcb,代码行数:46,代码来源:custom.c


示例9: cwt_remove_channel_listener

void cwt_remove_channel_listener( CHANNEL_PTR chan )
{
	DListNode* pNode = dlist_find(&__channel_list, chan);

	if( pNode ) {
		dlist_remove(&__channel_list, pNode);
		JQ_FREE(pNode);
	}
}
开发者ID:semenovf,项目名称:cwt,代码行数:9,代码来源:evio.c


示例10: rxd_rx_entry_release

void rxd_rx_entry_release(struct rxd_ep *ep, struct rxd_rx_entry *rx_entry)
{
	rx_entry->key = -1;
	dlist_remove(&rx_entry->entry);
	freestack_push(ep->rx_entry_fs, rx_entry);

	if (ep->credits && !dlist_empty(&ep->wait_rx_list))
		rxd_check_waiting_rx(ep);
}
开发者ID:a-abraham,项目名称:libfabric-cray,代码行数:9,代码来源:rxd_cq.c


示例11: dlist_destroy

//删除所有节点,利用init函数的destroy函数来清理内存
void dlist_destroy(DList* list)
{
	void *data;
	while((dlist_size(list))>0){
		if(dlist_remove(list,dlist_tail(list),(void **)&data)==0
				&& list->destroy != NULL){
			list->destroy(data);
		}
	}
}
开发者ID:Ijingli,项目名称:c-c-datastructure,代码行数:11,代码来源:dlist.c


示例12: __gnix_vc_cancel

static void __gnix_vc_cancel(struct gnix_vc *vc)
{
	struct gnix_nic *nic = vc->ep->nic;

	fastlock_acquire(&nic->rx_vc_lock);
	if (!dlist_empty(&vc->rx_list))
		dlist_remove(&vc->rx_list);
	fastlock_release(&nic->rx_vc_lock);

	fastlock_acquire(&nic->work_vc_lock);
	if (!dlist_empty(&vc->work_list))
		dlist_remove(&vc->work_list);
	fastlock_release(&nic->work_vc_lock);

	fastlock_acquire(&nic->tx_vc_lock);
	if (!dlist_empty(&vc->tx_list))
		dlist_remove(&vc->tx_list);
	fastlock_release(&nic->tx_vc_lock);
}
开发者ID:metalpine,项目名称:libfabric,代码行数:19,代码来源:gnix_vc.c


示例13: epoll_unregister

int32_t epoll_unregister(poller_t e,socket_t s)
{
	assert(e);assert(s);
	struct epoll_event ev;int32_t ret;
	TEMP_FAILURE_RETRY(ret = epoll_ctl(e->poller_fd,EPOLL_CTL_DEL,s->fd,&ev));
	s->readable = s->writeable = 0;
    dlist_remove((struct dnode*)s);
	s->engine = NULL;
	return ret;
}
开发者ID:Stan1990,项目名称:KendyNet,代码行数:10,代码来源:epoll.c


示例14: semC_remove

/*==============================================================================
 * - semC_remove()
 *
 * - when task delete, remove the task tcb from a semC's wait list
 */
OS_STATUS semC_remove (SEM_CNT *pSemC, OS_TCB *pTcb)
{
    int cpsr_c;

    cpsr_c = CPU_LOCK();
    dlist_remove (&pSemC->wait_list, (DL_NODE *)pTcb);
    CPU_UNLOCK(cpsr_c);

    return OS_STATUS_OK;
}
开发者ID:WangDongfang,项目名称:DfewOS,代码行数:15,代码来源:semC.c


示例15: dlist_destroy

void dlist_destroy(DList *list)
{
    void *data;
    while (dlist_size(list) > 0){
        if (dlist_remove(list, dlist_tail(list), (void**)&data) == 0 && list->destroy != NULL){
            //saukiam vartotojo nustatyta funkcija destroy dinaminei atminciai atlaisvinti
            list->destroy(data);
        }
    }
}
开发者ID:Engma90,项目名称:labs,代码行数:10,代码来源:list.c


示例16: dlist_destroy

void dlist_destroy(dlist_t *list)
{
    void *data;
    while (dlist_size(list) > 0)
    {
        if (dlist_remove(list, dlist_tail(list), (void **)&data) == 0 && list->destroy != NULL)
            list->destroy(data);
    }
    memset(list, 0, sizeof(dlist_t));
}
开发者ID:fatman2021,项目名称:byok,代码行数:10,代码来源:dlist.c


示例17: psmx2_sep_close

static int psmx2_sep_close(fid_t fid)
{
	struct psmx2_fid_sep *sep;
	struct psmx2_ep_name ep_name;
	int i;

	sep = container_of(fid, struct psmx2_fid_sep, ep.fid);

	if (ofi_atomic_get32(&sep->ref))
		return -FI_EBUSY;

	for (i = 0; i < sep->ctxt_cnt; i++) {
		if (sep->ctxts[i].ep && ofi_atomic_get32(&sep->ctxts[i].ep->ref))
			return -FI_EBUSY;
	}

	ep_name.epid = sep->ctxts[0].trx_ctxt->psm2_epid;
	ep_name.sep_id = sep->id;
	ep_name.type = sep->type;

	ofi_ns_del_local_name(&sep->domain->fabric->name_server,
			      &sep->service, &ep_name);

	for (i = 0; i < sep->ctxt_cnt; i++) {
		psmx2_lock(&sep->domain->trx_ctxt_lock, 1);
		dlist_remove(&sep->ctxts[i].trx_ctxt->entry);
		psmx2_unlock(&sep->domain->trx_ctxt_lock, 1);

		if (sep->ctxts[i].ep)
			psmx2_ep_close_internal(sep->ctxts[i].ep);

		psmx2_trx_ctxt_free(sep->ctxts[i].trx_ctxt);
	}

	psmx2_lock(&sep->domain->sep_lock, 1);
	dlist_remove(&sep->entry);
	psmx2_unlock(&sep->domain->sep_lock, 1);

	psmx2_domain_release(sep->domain);
	free(sep);
	return 0;
}
开发者ID:ashleypittman,项目名称:libfabric,代码行数:42,代码来源:psmx2_ep.c


示例18: connline_close

void connline_close(struct connline_context *context)
{
	if (context == NULL || is_connline_initialized() == false)
		return;

	__connline_close(context);
	dbus_connection_unref(context->dbus_cnx);

	contexts_list = dlist_remove(contexts_list, context);
	free(context);
}
开发者ID:connectivity,项目名称:connline,代码行数:11,代码来源:connline.c


示例19: dlist_destroy

void dlist_destroy(Dlist *dlist)
{
	void *data;
	while(dlist_size(dlist)>0)
	{
		if(dlist_remove(dlist,dlist_head(dlist),(void **)&data)==0 && dlist->destroy != NULL)
			dlist->destroy(data);
	}
	memset(dlist,0,sizeof(Dlist));
	return ;
}
开发者ID:xynhcwg,项目名称:impc,代码行数:11,代码来源:dlist.c


示例20: msgque_removeinterrupt

void   msgque_removeinterrupt(msgque_t que)
{
	ptq_t ptq = get_per_thread_que(que,MSGQ_READ);
	if(ptq->read_que.bnode.next || ptq->read_que.bnode.pre){
		mutex_lock(que->mtx);
        dlist_remove(&ptq->read_que.bnode);
		mutex_unlock(que->mtx);
	}
	ptq->read_que.ud = NULL;
	ptq->read_que.notify_function = NULL;
}
开发者ID:benjiam,项目名称:KendyNet,代码行数:11,代码来源:msgque.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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