本文整理汇总了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();
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例13: free_mprog
void free_mprog(MPROG_LIST *mp)
{
if (!IS_VALID(mp))
return;
INVALIDATE(mp);
mp->next = mprog_free;
mprog_free = mp;
}
示例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;
}
示例15: free_ward
void free_ward(WARD_DATA *wd)
{
if (!IS_VALID(wd))
return;
INVALIDATE(wd);
wd->next = ward_free;
ward_free = wd;
}