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


C++ INVALIDATE函数代码示例

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


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

示例1: glue

void glue(address_space_stb, SUFFIX)(ARG1_DECL,
    hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result)
{
    uint8_t *ptr;
    MemoryRegion *mr;
    hwaddr l = 1;
    hwaddr addr1;
    MemTxResult r;
    bool release_lock = false;

    RCU_READ_LOCK();
    mr = TRANSLATE(addr, &addr1, &l, true);
    if (!IS_DIRECT(mr, true)) {
        release_lock |= prepare_mmio_access(mr);
        r = memory_region_dispatch_write(mr, addr1, val, 1, attrs);
    } else {
        /* RAM case */
        ptr = MAP_RAM(mr, addr1);
        stb_p(ptr, val);
        INVALIDATE(mr, addr1, 1);
        r = MEMTX_OK;
    }
    if (result) {
        *result = r;
    }
    if (release_lock) {
        qemu_mutex_unlock_iothread();
    }
    RCU_READ_UNLOCK();
}
开发者ID:8tab,项目名称:qemu,代码行数:30,代码来源:memory_ldst.inc.c

示例2: free_pcdata

void free_pcdata(PC_DATA *pcdata)
{
    int alias;
   GRANT_DATA *gran,*gran_next;

    if (!IS_VALID(pcdata))
	return;

    free_string(pcdata->pwd);
    free_string(pcdata->bamfin);
    free_string(pcdata->bamfout);
    free_string(pcdata->title);
    free_buf(pcdata->buffer);

     for (gran = pcdata->granted; gran != NULL; gran = gran_next)
    {
        gran_next = gran->next;
        free_string(gran->name);
        free_mem(gran,sizeof(*gran));
    }

    for (alias = 0; alias < MAX_ALIAS; alias++)
    {
	free_string(pcdata->alias[alias]);
	free_string(pcdata->alias_sub[alias]);
    }
    INVALIDATE(pcdata);
    pcdata->next = pcdata_free;
    pcdata_free = pcdata;

    return;
}
开发者ID:verias,项目名称:SRMud,代码行数:32,代码来源:recycle.c

示例3: free_pcdata

void free_pcdata(PC_DATA *pcdata)
{
    int alias;

    if (!IS_VALID(pcdata))
	return;

    free_string(pcdata->pwd);
    free_string(pcdata->bamfin);
    free_string(pcdata->bamfout);
    free_string(pcdata->invisin);
    free_string(pcdata->invisout);
    free_string(pcdata->who_descr);
    free_string(pcdata->title);
    free_buf(pcdata->buffer);
    
    for (alias = 0; alias < MAX_ALIAS; alias++)
    {
	free_string(pcdata->alias[alias]);
	free_string(pcdata->alias_sub[alias]);
    }
    for (alias = 0; alias < MAX_FORGET; alias++)
    {
	free_string(pcdata->forget[alias]);
    }
    for (alias = 0; alias < MAX_DUPES; alias++)
    {
	free_string(pcdata->dupes[alias]);
    }
    INVALIDATE(pcdata);
    pcdata->next = pcdata_free;
    pcdata_free = pcdata;

    return;
}
开发者ID:Firehed,项目名称:RotK,代码行数:35,代码来源:recycle.c

示例4: free_obj

void free_obj( OBJ_DATA *obj )
{
	AFFECT_DATA			*paf, *paf_next;
	EXTRA_DESCR_DATA	*ed, *ed_next;
	/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/

	if ( !IS_VALID(obj) )
		return;

	for ( paf = obj->affected; paf != NULL; paf = paf_next )
	{
		paf_next = paf->next;
		free_affect( paf );
	}

	obj->affected = NULL;

	for ( ed = obj->extra_descr; ed != NULL; ed = ed_next )
	{
		ed_next = ed->next;
		free_extra_descr( ed );
	}

	obj->extra_descr = NULL;

	free_string( obj->name );
	free_string( obj->description );
	free_string( obj->short_descr );
	free_string( obj->owner );
	INVALIDATE( obj );

	obj->next = obj_free;
	obj_free = obj;
}
开发者ID:Onirik79,项目名称:xandramud,代码行数:34,代码来源:recycle.c

示例5: extract_obj

Character::~Character()
{
	OBJ_DATA *obj_next;
	AFFECT_DATA *paf_next;
    if ( this->short_descr ) free_string( this->short_descr );
    if ( this->long_descr ) free_string( this->long_descr );
    if ( this->prompt ) free_string( this->prompt );
    if ( this->prefix ) free_string( this->prefix );
    if ( this->material ) free_string( this->material );

    for (OBJ_DATA *obj = this->carrying; obj != NULL; obj = obj_next)
    {
		obj_next = obj->next_content;
		extract_obj(obj);
    }

    for (AFFECT_DATA *paf = this->affected; paf != NULL; paf = paf_next)
    {
		paf_next = paf->next;
		affect_remove(this,paf);
    }

    if (this->pcdata != NULL) {
        delete this->pcdata;
        this->pcdata = NULL;
    }

    INVALIDATE(this);
}
开发者ID:carriercomm,项目名称:ForgottenLegends,代码行数:29,代码来源:Character.cpp

示例6: ips_tidcache_cleanup

/*
 *
 * Call driver to free all cached tids.
 */
psm2_error_t
ips_tidcache_cleanup(struct ips_tid *tidc)
{
	cl_qmap_t *p_map = &tidc->tid_cachemap;
	psm2_error_t err;
	int i, j;

	j = 0;
	for (i = 1; i <= tidc->tid_ctrl->tid_num_max; i++) {
		psmi_assert(REFCNT(i) == 0);
		if (INVALIDATE(i) == 0) {
			tidc->tid_array[j++] = p_map->root[i].payload.tidinfo;
		}
	}

	if (j > 0) {
		/*
		 * call driver to free the tids.
		 */
		if (hfi_free_tid(tidc->context->ctrl,
			    (uint64_t) (uintptr_t) tidc->tid_array, j) < 0) {
			/* If failed to unpin pages, it's fatal error */
			err = psmi_handle_error(tidc->context->ep,
				PSM2_EP_DEVICE_FAILURE,
				"Failed to tid free %d tids", j);
			return err;
		}
	}

	psmi_free(tidc->tid_array);
	psmi_free(tidc->tid_cachemap.root);

	return PSM2_OK;
}
开发者ID:01org,项目名称:opa-psm2,代码行数:38,代码来源:ips_tidcache.c

示例7: free_pcdata

void free_pcdata(PC_DATA *pcdata)
{
    int alias;

    if (!IS_VALID(pcdata))
	return;

    free_string(pcdata->pwd);
    free_string(pcdata->bamfin);
    free_string(pcdata->bamfout);
    free_string(pcdata->roomin);
    free_string(pcdata->roomout);
    free_string(pcdata->wiziin); /* Ferg-wizicust */
    free_string(pcdata->wiziout); /* Ferg-wizicust */
    free_string(pcdata->title);
    free_buf(pcdata->buffer);

    for (alias = 0; alias < MAX_ALIAS; alias++)
    {
	free_string(pcdata->alias[alias]);
	free_string(pcdata->alias_sub[alias]);
    }
    INVALIDATE(pcdata);
    pcdata->next = pcdata_free;
    pcdata_free = pcdata;

    return;
}
开发者ID:q-aurelius,项目名称:magmud,代码行数:28,代码来源:recycle.c

示例8: free_storer_data

void free_storer_data( ARTEFACT_STORER *storer )
{
	if ( !IS_VALID( storer ) ) return ;
	INVALIDATE( storer );
	storer->next = storer_free;
	storer_free = storer;
}
开发者ID:Tener,项目名称:KillerMUD,代码行数:7,代码来源:artefact.c

示例9: LOCK

odp_buffer_hdr_t *queue_deq(queue_entry_t *queue)
{
	odp_buffer_hdr_t *buf_hdr;

	if (LOAD_PTR(queue->s.head) == NULL)
		return NULL;

	LOCK(queue);

	buf_hdr       = LOAD_PTR(queue->s.head);
	if (buf_hdr == NULL) {
		UNLOCK(queue);
		return NULL;
	}

	INVALIDATE(buf_hdr);
	STORE_PTR(queue->s.head, buf_hdr->next);
	if (buf_hdr->next == NULL) {
		/* Queue is now empty */
		STORE_PTR(queue->s.tail, NULL);
		if (LOAD_S32(queue->s.status) == QUEUE_STATUS_SCHED)
			STORE_S32(queue->s.status, QUEUE_STATUS_NOTSCHED);
	}

	buf_hdr->next = NULL;


	UNLOCK(queue);

	return buf_hdr;
}
开发者ID:rahulgvf,项目名称:odp-mppa,代码行数:31,代码来源:odp_queue.c

示例10: odp_rwlock_recursive_init

void odp_rwlock_recursive_init(odp_rwlock_recursive_t *rlock)
{
	INVALIDATE(rlock);
	memset(rlock, 0, sizeof(odp_rwlock_recursive_t));
	rlock->wr_owner = NO_OWNER;
	__builtin_k1_wpurge();
	odp_rwlock_init(&rlock->lock);
}
开发者ID:kalray,项目名称:odp-mppa,代码行数:8,代码来源:odp_rwlock_recursive.c

示例11: timer_fini

/* Teardown when timer is freed */
static void timer_fini(odp_timer *tim, tick_buf_t *tb)
{
	INVALIDATE(tb);
	ODP_ASSERT(tb->exp_tck.v == TMO_UNUSED);
	ODP_ASSERT(tb->tmo_buf == ODP_BUFFER_INVALID);
	tim->queue = ODP_QUEUE_INVALID;
	tim->user_ptr = NULL;
}
开发者ID:rahulgvf,项目名称:odp-mppa,代码行数:9,代码来源:odp_timer.c

示例12: free_sleep_data

void free_sleep_data(SLEEP_DATA *sd)
{
  if (!IS_VALID(sd))
    return;
  
  INVALIDATE(sd);
  sd->next = sd_free;
  sd_free = sd;
}
开发者ID:carolharper,项目名称:Shadows,代码行数:9,代码来源:recycle.c

示例13: free_mprog

void free_mprog(MPROG_LIST *mp)
{
   if (!IS_VALID(mp))
      return;

   INVALIDATE(mp);
   mp->next = mprog_free;
   mprog_free = mp;
}
开发者ID:carolharper,项目名称:Shadows,代码行数:9,代码来源:recycle.c

示例14: free_room_weave

void free_room_weave(AFFECT_DATA *wd)
{
  if (!IS_VALID(wd))
    return;
  
  INVALIDATE(wd);
  wd->next = room_weave_free;
  room_weave_free = wd;
}
开发者ID:carolharper,项目名称:Shadows,代码行数:9,代码来源:recycle.c

示例15: free_ward

void free_ward(WARD_DATA *wd)
{
  if (!IS_VALID(wd))
    return;

  INVALIDATE(wd);
  wd->next = ward_free;
  ward_free = wd;
}
开发者ID:carolharper,项目名称:Shadows,代码行数:9,代码来源:recycle.c


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