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


C++ dlist_remove函数代码示例

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


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


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