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

C++ IS_VALID函数代码示例

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

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



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

示例1: hsa_amd_profiling_get_dispatch_time

hsa_status_t HSA_API
hsa_amd_profiling_get_dispatch_time(hsa_agent_t agent_handle,
                                    hsa_signal_t hsa_signal,
                                    hsa_amd_profiling_dispatch_time_t* time) {
  IS_OPEN();

  IS_BAD_PTR(time);

  core::Agent* agent = core::Agent::Convert(agent_handle);

  IS_VALID(agent);

  core::Signal* signal = core::Signal::Convert(hsa_signal);

  IS_VALID(signal);

  if (agent->device_type() != core::Agent::kAmdGpuDevice) {
    return HSA_STATUS_ERROR_INVALID_AGENT;
  }

  amd::GpuAgentInt* gpu_agent = static_cast<amd::GpuAgentInt*>(agent);

  gpu_agent->TranslateTime(signal, *time);

  return HSA_STATUS_SUCCESS;
}
开发者ID:HSAFoundation,项目名称:HSA-Runtime-Reference-Source,代码行数:26,代码来源:hsa_ext_amd.cpp


示例2: SQLNativeSql

SQLRETURN SQL_API SQLNativeSql(SQLHDBC ConnectionHandle,
			       SQLCHAR * InStatementText,
			       SQLINTEGER TextLength1,
			       SQLCHAR * OutStatementText,
			       SQLINTEGER BufferLength,
			       SQLINTEGER * TextLength2Ptr)
{
	hDbc_T *dbc = (hDbc_T *) ConnectionHandle;
	SQLRETURN status = SQL_SUCCESS;
	if (ENABLE_TRACE) {

		ood_log_message(dbc, __FILE__, __LINE__, TRACE_FUNCTION_ENTRY,
				(SQLHANDLE) dbc, 0, "");
	}
	ood_clear_diag((hgeneric *) dbc);
	THREAD_MUTEX_LOCK(dbc);

	THREAD_MUTEX_UNLOCK(dbc);
	if (ENABLE_TRACE) {
		ood_log_message(dbc, __FILE__, __LINE__, TRACE_FUNCTION_EXIT,
				(SQLHANDLE) NULL, status, "");
	}
	fprintf(stderr, "called stubbed function line %d file %s\n", __LINE__,
		__FILE__);
	assert(IS_VALID(dbc));
	return SQL_SUCCESS;
}
开发者ID:ajayk15june,项目名称:oraODBC,代码行数:27,代码来源:SQLNativeSql.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: hsa_amd_coherency_set_type

hsa_status_t HSA_API hsa_amd_coherency_set_type(hsa_agent_t agent_handle,
                                                hsa_amd_coherency_type_t type) {
  IS_OPEN();

  core::Agent* agent = core::Agent::Convert(agent_handle);

  IS_VALID(agent);

  if (type < HSA_AMD_COHERENCY_TYPE_COHERENT ||
      type > HSA_AMD_COHERENCY_TYPE_NONCOHERENT) {
    return HSA_STATUS_ERROR_INVALID_ARGUMENT;
  }

  if (agent->device_type() != core::Agent::kAmdGpuDevice) {
    return HSA_STATUS_ERROR_INVALID_AGENT;
  }

  amd::GpuAgent* gpu_agent = static_cast<amd::GpuAgent*>(agent);

  if (!gpu_agent->current_coherency_type(type)) {
    return HSA_STATUS_ERROR;
  }

  return HSA_STATUS_SUCCESS;
}
开发者ID:HSAFoundation,项目名称:HSA-Runtime-Reference-Source,代码行数:25,代码来源:hsa_ext_amd.cpp


示例6: 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


示例7: 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


示例8: 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


示例9: 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


示例10: 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


示例11: hsa_ext_set_profiling

hsa_status_t HSA_API hsa_ext_set_profiling(hsa_queue_t* queue, int enable) {
  core::Queue* cmd_queue = core::Queue::Convert(queue);

  IS_VALID(cmd_queue);

  cmd_queue->amd_queue_.enable_profiling = (enable != 0);

  return HSA_STATUS_SUCCESS;
}
开发者ID:neuroradiology,项目名称:HSA-Runtime-Reference-Source,代码行数:9,代码来源:hsa_ext_amd.cpp


示例12: free_rprog

void free_rprog(PROG_LIST *rp)
{
   if (!IS_VALID(rp))
      return;

   INVALIDATE(rp);
   rp->next = rprog_free;
   rprog_free = rp;
}
开发者ID:verias,项目名称:SRMud,代码行数:9,代码来源:recycle.c


示例13: free_oprog

void free_oprog(PROG_LIST *op)
{
   if (!IS_VALID(op))
      return;

   INVALIDATE(op);
   op->next = oprog_free;
   oprog_free = op;
}
开发者ID:verias,项目名称:SRMud,代码行数: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_residue

void free_residue(RESIDUE_DATA *rd)
{
  if (!IS_VALID(rd))
    return;

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


示例16: free_mem_data

void free_mem_data(MEM_DATA *memory)
{
    if (!IS_VALID(memory))
    return;

    memory->next = mem_data_free;
    mem_data_free = memory;
    INVALIDATE(memory);
}
开发者ID:Onirik79,项目名称:xandramud,代码行数:9,代码来源:recycle.c


示例17: free_affect

void free_affect( AFFECT_DATA *af )
{
	if ( !IS_VALID(af) )
		return;

	INVALIDATE( af );
	af->next = affect_free;
	affect_free = af;
}
开发者ID:Onirik79,项目名称:xandramud,代码行数:9,代码来源:recycle.c


示例18: 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


示例19: yield

/**
 * @brief Yields the processor.
 */
PUBLIC void yield(void)
{
	struct process *p;    /* Working process.     */
	struct process *next; /* Next process to run. */

	/* Re-schedule process for execution. */
	if (curr_proc->state == PROC_RUNNING)
		sched(curr_proc);

	/* Remember this process. */
	last_proc = curr_proc;

	/* Check alarm. */
	for (p = FIRST_PROC; p <= LAST_PROC; p++)
	{
		/* Skip invalid processes. */
		if (!IS_VALID(p))
			continue;
		
		/* Alarm has expired. */
		if ((p->alarm) && (p->alarm < ticks))
			p->alarm = 0, sndsig(p, SIGALRM);
	}

	/* Choose a process to run next. */
	next = IDLE;
	for (p = FIRST_PROC; p <= LAST_PROC; p++)
	{
		/* Skip non-ready process. */
		if (p->state != PROC_READY)
			continue;
		
		/*
		 * Process with higher
		 * waiting time found.
		 */
		if (p->counter > next->counter)
		{
			next->counter++;
			next = p;
		}
			
		/*
		 * Increment waiting
		 * time of process.
		 */
		else
			p->counter++;
	}
	
	/* Switch to next process. */
	next->priority = PRIO_USER;
	next->state = PROC_RUNNING;
	next->counter = PROC_QUANTUM;
	switch_to(next);
}
开发者ID:tabocu,项目名称:nanvix,代码行数:59,代码来源:sched.c


示例20: free_char

void free_char (CHAR_DATA *ch)
{
    OBJ_DATA *obj;
    OBJ_DATA *obj_next;
    AFFECT_DATA *paf;
    AFFECT_DATA *paf_next;

    if (!IS_VALID(ch))
	return;

    if (IS_NPC(ch))
	mobile_count--;

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

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


    free_string(ch->name);
    free_string(ch->wkname);
    free_string(ch->real_name);
    free_string(ch->short_descr);
    free_string(ch->long_descr);
    free_string(ch->description);
    free_string(ch->hood_description);
    free_string(ch->veil_description);
    free_string(ch->wolf_description);
    free_string(ch->wound_description);
    free_string(ch->aura_description);
    free_string(ch->prompt);
    free_string(ch->prefix);
    
    free_string(ch->gtitle);
    free_string(ch->sguild_title);
    free_string(ch->tguild_title);
    free_string(ch->mtitle);
    free_string(ch->mname);
    
    
  /*  free_note  (ch->pnote); */
    free_pcdata(ch->pcdata);

    ch->next = char_free;
    char_free  = ch;

    INVALIDATE(ch);
    return;
}
开发者ID:carolharper,项目名称:Shadows,代码行数:56,代码来源:recycle.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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