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


C++ CHECK_ID函数代码示例

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


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

示例1: can_act

ER_UINT
can_act(ID tskid)
{
	TCB		*p_tcb;
	ER_UINT	ercd;

	LOG_CAN_ACT_ENTER(tskid);
	CHECK_TSKCTX_UNL();							/*[NGKI1139][NGKI1140]*/
	if (tskid == TSK_SELF) {
		p_tcb = p_runtsk;						/*[NGKI1146]*/
	}
	else {
		CHECK_ID(VALID_TSKID(tskid));			/*[NGKI1141]*/
		p_tcb = get_tcb(tskid);
	}

	lock_cpu();
	ercd = p_tcb->actque ? 1 : 0;				/*[NGKI1144]*/
	p_tcb->actque = false;						/*[NGKI1144]*/
	unlock_cpu();

  error_exit:
	LOG_CAN_ACT_LEAVE(ercd);
	return(ercd);
}
开发者ID:morioka,项目名称:toppers-asp3-for-linux,代码行数:25,代码来源:task_manage.c

示例2: prcv_pdq

ER
prcv_pdq(ID pdqid, intptr_t *p_data, PRI *p_datapri)
{
	PDQCB	*p_pdqcb;
	ER		ercd;

	LOG_PRCV_PDQ_ENTER(pdqid, p_data, p_datapri);
	CHECK_TSKCTX_UNL();
	CHECK_ID(VALID_PDQID(pdqid));
	p_pdqcb = get_pdqcb(pdqid);

	lock_cpu();
	if (receive_pridata(p_pdqcb, p_data, p_datapri)) {
		if (p_runtsk != p_schedtsk) {
			dispatch();
		}
		ercd = E_OK;
	}
	else {
		ercd = E_TMOUT;
	}
	unlock_cpu();

  error_exit:
	LOG_PRCV_PDQ_LEAVE(ercd, p_data, p_datapri);
	return(ercd);
}
开发者ID:morioka,项目名称:toppers-asp3-for-linux,代码行数:27,代码来源:pridataq.c

示例3: ini_pdq

ER
ini_pdq(ID pdqid)
{
	PDQCB	*p_pdqcb;
	ER		ercd;
    
	LOG_INI_PDQ_ENTER(pdqid);
	CHECK_TSKCTX_UNL();
	CHECK_ID(VALID_PDQID(pdqid));
	p_pdqcb = get_pdqcb(pdqid);

	lock_cpu();
	init_wait_queue(&(p_pdqcb->swait_queue));
	init_wait_queue(&(p_pdqcb->rwait_queue));
	p_pdqcb->count = 0U;
	p_pdqcb->p_head = NULL;
	p_pdqcb->unused = 0U;
	p_pdqcb->p_freelist = NULL;
	if (p_runtsk != p_schedtsk) {
		dispatch();
	}
	ercd = E_OK;
	unlock_cpu();

  error_exit:
	LOG_INI_PDQ_LEAVE(ercd);
	return(ercd);
}
开发者ID:morioka,项目名称:toppers-asp3-for-linux,代码行数:28,代码来源:pridataq.c

示例4: psnd_pdq

ER
psnd_pdq(ID pdqid, intptr_t data, PRI datapri)
{
	PDQCB	*p_pdqcb;
	ER		ercd;

	LOG_PSND_PDQ_ENTER(pdqid, data, datapri);
	CHECK_UNL();
	CHECK_ID(VALID_PDQID(pdqid));
	p_pdqcb = get_pdqcb(pdqid);
	CHECK_PAR(TMIN_DPRI <= datapri && datapri <= p_pdqcb->p_pdqinib->maxdpri);

	lock_cpu();
	if (send_pridata(p_pdqcb, data, datapri)) {
		if (p_runtsk != p_schedtsk) {
			if (!sense_context()) {
				dispatch();
			}
			else {
				request_dispatch();
			}
		}
		ercd = E_OK;
	}
	else {
		ercd = E_TMOUT;
	}
	unlock_cpu();

  error_exit:
	LOG_PSND_PDQ_LEAVE(ercd);
	return(ercd);
}
开发者ID:morioka,项目名称:toppers-asp3-for-linux,代码行数:33,代码来源:pridataq.c

示例5: stp_alm

ER
stp_alm(ID almid)
{
	ALMCB	*p_almcb;
	ER		ercd;

	LOG_STP_ALM_ENTER(almid);
	CHECK_UNL();
	CHECK_ID(VALID_ALMID(almid));
	p_almcb = get_almcb(almid);

	lock_cpu();
	if (p_almcb->p_alminib->almatr == TA_NOEXS) {
		ercd = E_NOEXS;
	}
	else {
		if (p_almcb->almsta) {
			p_almcb->almsta = false;
			tmevtb_dequeue(&(p_almcb->tmevtb));
		}
		ercd = E_OK;
	}
	unlock_cpu();

  error_exit:
	LOG_STP_ALM_LEAVE(ercd);
	return(ercd);
}
开发者ID:morioka,项目名称:toppers-asp3-for-linux,代码行数:28,代码来源:alarm.c

示例6: CHECK_ID

HRESULT CSWDomeCameraTimer::Set(const DWORD& dwID, const TIMER_PARAM_STRUCT& sSetting)
{
	CHECK_ID(dwID, MAX_TIMER);

	if (sSetting.iBeginTime >= sSetting.iEndTime)
	{
		return E_INVALIDARG;
	}

	if (sSetting.fValid)
	{
		if (sSetting.fEnable)
		{
			StartTimer();
		}
		else if (GetSetting().Get().sTimerParam[dwID].fEnable)
		{
			//stop previous motion
			StopMotion(GetSetting().Get().sTimerParam[dwID].iMotionType, GetSetting().Get().sTimerParam[dwID].iMotionID);
		}
	}
	
	swpa_memcpy(&GetSetting().Get().sTimerParam[dwID], &sSetting, sizeof(GetSetting().Get().sTimerParam[dwID]));
	
	return SaveSetting(dwID);
}
开发者ID:fangbaolei,项目名称:EC700IR,代码行数:26,代码来源:SWDomeCameraTimer.cpp

示例7: get_pri

ER
get_pri(ID tskid, PRI *p_tskpri)
{
	TCB		*p_tcb;
	ER		ercd;

	LOG_GET_PRI_ENTER(tskid, p_tskpri);
	CHECK_TSKCTX_UNL();							/*[NGKI1203][NGKI1204]*/
	if (tskid == TSK_SELF) {
		p_tcb = p_runtsk;						/*[NGKI1211]*/
	}
	else {
		CHECK_ID(VALID_TSKID(tskid));			/*[NGKI1205]*/
		p_tcb = get_tcb(tskid);
	}

	lock_cpu();
	if (TSTAT_DORMANT(p_tcb->tstat)) {
		ercd = E_OBJ;							/*[NGKI1209]*/
	}
	else {
		*p_tskpri = EXT_TSKPRI(p_tcb->priority);	/*[NGKI1210]*/
		ercd = E_OK;
	}
	unlock_cpu();

  error_exit:
	LOG_GET_PRI_LEAVE(ercd, p_tskpri);
	return(ercd);
}
开发者ID:morioka,项目名称:toppers-asp3-for-linux,代码行数:30,代码来源:task_manage.c

示例8: wai_sem

ER
wai_sem(ID semid)
{
	SEMCB	*p_semcb;
	WINFO_SEM winfo_sem;
	ER		ercd;

	LOG_WAI_SEM_ENTER(semid);
	CHECK_DISPATCH();
	CHECK_ID(VALID_SEMID(semid));
	p_semcb = get_semcb(semid);

	lock_cpu_dsp();
	if (p_semcb->p_seminib->sematr == TA_NOEXS) {
		ercd = E_NOEXS;
	}
	else if (p_runtsk->raster) {
		ercd = E_RASTER;
	}
	else if (p_semcb->semcnt >= 1) {
		p_semcb->semcnt -= 1;
		ercd = E_OK;
	}
	else {
		p_runtsk->tstat = TS_WAITING_SEM;
		wobj_make_wait((WOBJCB *) p_semcb, (WINFO_WOBJ *) &winfo_sem);
		dispatch();
		ercd = winfo_sem.winfo.wercd;
	}
	unlock_cpu_dsp();

  error_exit:
	LOG_WAI_SEM_LEAVE(ercd);
	return(ercd);
}
开发者ID:takeharukato,项目名称:asp3-aarch64,代码行数:35,代码来源:semaphore.c

示例9: sac_sem

ER
sac_sem(ID semid, const ACVCT *p_acvct)
{
	SEMCB	*p_semcb;
	SEMINIB	*p_seminib;
	ER		ercd;

	LOG_SAC_SEM_ENTER(semid, p_acvct);
	CHECK_TSKCTX_UNL();
	CHECK_ID(VALID_SEMID(semid));
	CHECK_MACV_READ(p_acvct, ACVCT);
	p_semcb = get_semcb(semid);

	lock_cpu();
	if (p_semcb->p_seminib->sematr == TA_NOEXS) {
		ercd = E_NOEXS;
	}
	else if (VIOLATE_ACPTN(p_semcb->p_seminib->acvct.acptn3)) {
		ercd = E_OACV;
	}
	else if (SEMID(p_semcb) <= tmax_ssemid) {
		ercd = E_OBJ;
	}
	else {
		p_seminib = (SEMINIB *)(p_semcb->p_seminib);
		p_seminib->acvct = *p_acvct;
		ercd = E_OK;
	}
	unlock_cpu();

  error_exit:
	LOG_SAC_SEM_LEAVE(ercd);
	return(ercd);
}
开发者ID:ev3rt-git,项目名称:ev3rt-hrp3,代码行数:34,代码来源:semaphore.c

示例10: del_sem

ER
del_sem(ID semid)
{
	SEMCB	*p_semcb;
	SEMINIB	*p_seminib;
	ER		ercd;

	LOG_DEL_SEM_ENTER(semid);
	CHECK_TSKCTX_UNL();
	CHECK_ID(VALID_SEMID(semid));
	p_semcb = get_semcb(semid);

	lock_cpu();
	if (p_semcb->p_seminib->sematr == TA_NOEXS) {
		ercd = E_NOEXS;
	}
	else if (semid <= tmax_ssemid) {
		ercd = E_OBJ;
	}
	else {
		init_wait_queue(&(p_semcb->wait_queue));
		p_seminib = (SEMINIB *)(p_semcb->p_seminib);
		p_seminib->sematr = TA_NOEXS;
		queue_insert_prev(&free_semcb, &(p_semcb->wait_queue));
		if (p_runtsk != p_schedtsk) {
			dispatch();
		}
		ercd = E_OK;
	}
	unlock_cpu();

  error_exit:
	LOG_DEL_SEM_LEAVE(ercd);
	return(ercd);
}
开发者ID:takeharukato,项目名称:asp3-aarch64,代码行数:35,代码来源:semaphore.c

示例11: Type0Font_cache_get

Type0Font *
Type0Font_cache_get (int id)
{
  CHECK_ID(id);

  return &__cache.fonts[id];
}
开发者ID:YandYTeX,项目名称:ptex-ng,代码行数:7,代码来源:type0.c

示例12: ref_mpf

ER
ref_mpf(ID mpfid, T_RMPF *pk_rmpf)
{
	MPFCB	*p_mpfcb;
	ER		ercd;
    
	LOG_REF_MPF_ENTER(mpfid, pk_rmpf);
	CHECK_TSKCTX_UNL();
	CHECK_ID(VALID_MPFID(mpfid));
	p_mpfcb = get_mpfcb(mpfid);

	lock_cpu();
	if (p_mpfcb->p_mpfinib->mpfatr == TA_NOEXS) {
		ercd = E_NOEXS;
	}
	else {
		pk_rmpf->wtskid = wait_tskid(&(p_mpfcb->wait_queue));
		pk_rmpf->fblkcnt = p_mpfcb->fblkcnt;
		ercd = E_OK;
	}
	unlock_cpu();

  error_exit:
	LOG_REF_MPF_LEAVE(ercd, pk_rmpf);
	return(ercd);
}
开发者ID:morioka,项目名称:toppers-asp3-for-linux,代码行数:26,代码来源:mempfix.c

示例13: ini_mpf

ER
ini_mpf(ID mpfid)
{
	MPFCB	*p_mpfcb;
	ER		ercd;
    
	LOG_INI_MPF_ENTER(mpfid);
	CHECK_TSKCTX_UNL();
	CHECK_ID(VALID_MPFID(mpfid));
	p_mpfcb = get_mpfcb(mpfid);

	lock_cpu();
	if (p_mpfcb->p_mpfinib->mpfatr == TA_NOEXS) {
		ercd = E_NOEXS;
	}
	else {
		init_wait_queue(&(p_mpfcb->wait_queue));
		p_mpfcb->fblkcnt = p_mpfcb->p_mpfinib->blkcnt;
		p_mpfcb->unused = 0U;
		p_mpfcb->freelist = INDEX_NULL;
		if (p_runtsk != p_schedtsk) {
			dispatch();
		}
		ercd = E_OK;
	}
	unlock_cpu();

  error_exit:
	LOG_INI_MPF_LEAVE(ercd);
	return(ercd);
}
开发者ID:morioka,项目名称:toppers-asp3-for-linux,代码行数:31,代码来源:mempfix.c

示例14: pget_mpf

ER
pget_mpf(ID mpfid, void **p_blk)
{
	MPFCB	*p_mpfcb;
	ER		ercd;

	LOG_PGET_MPF_ENTER(mpfid, p_blk);
	CHECK_TSKCTX_UNL();
	CHECK_ID(VALID_MPFID(mpfid));
	p_mpfcb = get_mpfcb(mpfid);

	lock_cpu();
	if (p_mpfcb->p_mpfinib->mpfatr == TA_NOEXS) {
		ercd = E_NOEXS;
	}
	else if (p_mpfcb->fblkcnt > 0) {
		get_mpf_block(p_mpfcb, p_blk);
		ercd = E_OK;
	}
	else {
		ercd = E_TMOUT;
	}
	unlock_cpu();

  error_exit:
	LOG_PGET_MPF_LEAVE(ercd, p_blk);
	return(ercd);
}
开发者ID:morioka,项目名称:toppers-asp3-for-linux,代码行数:28,代码来源:mempfix.c

示例15: pol_sem

ER
pol_sem(ID semid)
{
	SEMCB	*p_semcb;
	ER		ercd;

	LOG_POL_SEM_ENTER(semid);
	CHECK_TSKCTX_UNL();
	CHECK_ID(VALID_SEMID(semid));
	p_semcb = get_semcb(semid);

	lock_cpu();
	if (p_semcb->p_seminib->sematr == TA_NOEXS) {
		ercd = E_NOEXS;
	}
	else if (p_semcb->semcnt >= 1) {
		p_semcb->semcnt -= 1;
		ercd = E_OK;
	}
	else {
		ercd = E_TMOUT;
	}
	unlock_cpu();

  error_exit:
	LOG_POL_SEM_LEAVE(ercd);
	return(ercd);
}
开发者ID:takeharukato,项目名称:asp3-aarch64,代码行数:28,代码来源:semaphore.c


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