本文整理汇总了C++中CHECK_TSKCTX_UNL函数的典型用法代码示例。如果您正苦于以下问题:C++ CHECK_TSKCTX_UNL函数的具体用法?C++ CHECK_TSKCTX_UNL怎么用?C++ CHECK_TSKCTX_UNL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CHECK_TSKCTX_UNL函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: sac_pdq
ER
sac_pdq(ID pdqid, const ACVCT *p_acvct)
{
PDQCB *p_pdqcb;
PDQINIB *p_pdqinib;
ER ercd;
LOG_SAC_PDQ_ENTER(pdqid, p_acvct);
CHECK_TSKCTX_UNL();
CHECK_PDQID(pdqid);
CHECK_MACV_READ(p_acvct, ACVCT);
p_pdqcb = get_pdqcb(pdqid);
t_lock_cpu();
if (p_pdqcb->p_pdqinib->pdqatr == TA_NOEXS) {
ercd = E_NOEXS;
}
else if (VIOLATE_ACPTN(p_pdqcb->p_pdqinib->acvct.acptn3)) {
ercd = E_OACV;
}
else if (PDQID(p_pdqcb) > tmax_spdqid) {
p_pdqinib = (PDQINIB *)(p_pdqcb->p_pdqinib);
p_pdqinib->acvct = *p_acvct;
ercd = E_OK;
}
else {
ercd = E_OBJ;
}
t_unlock_cpu();
error_exit:
LOG_SAC_PDQ_LEAVE(ercd);
return(ercd);
}
开发者ID:yuyaotsuka,项目名称:etrobo,代码行数:34,代码来源:pridataq.c
示例2: ref_alm
ER
ref_alm(ID almid, T_RALM *pk_ralm)
{
ALMCB *p_almcb;
ER ercd;
LOG_REF_ALM_ENTER(almid, pk_ralm);
CHECK_TSKCTX_UNL();
CHECK_ALMID(almid);
p_almcb = get_almcb(almid);
t_lock_cpu();
if (p_almcb->almsta) {
pk_ralm->almstat = TALM_STA;
pk_ralm->lefttim = tmevt_lefttim(&(p_almcb->tmevtb));
}
else {
pk_ralm->almstat = TALM_STP;
}
ercd = E_OK;
t_unlock_cpu();
error_exit:
LOG_REF_ALM_LEAVE(ercd, pk_ralm);
return(ercd);
}
开发者ID:blarryt,项目名称:toppers-asp,代码行数:26,代码来源:alarm.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: 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();
CHECK_TSKID_SELF(tskid);
CHECK_MACV_WRITE(p_tskpri, PRI);
p_tcb = get_tcb_self(tskid);
CHECK_ACPTN(p_tcb->p_tinib->acvct.acptn4);
t_lock_cpu();
if (TSTAT_DORMANT(p_tcb->tstat)) {
ercd = E_OBJ;
}
else {
*p_tskpri = EXT_TSKPRI(p_tcb->priority);
ercd = E_OK;
}
t_unlock_cpu();
error_exit:
LOG_GET_PRI_LEAVE(ercd, *p_tskpri);
return(ercd);
}
开发者ID:PizzaFactory,项目名称:hrp2ev3,代码行数:27,代码来源:task_manage.c
示例5: 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 (p_tcb->p_tinib->tskatr == TA_NOEXS) {
ercd = E_NOEXS; /*[NGKI1206]*/
}
else 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:takeharukato,项目名称:asp3-aarch64,代码行数:33,代码来源:task_manage.c
示例6: rot_rdq
ER
rot_rdq(PRI tskpri)
{
uint_t pri;
QUEUE *p_queue;
ER ercd;
LOG_ROT_RDQ_ENTER(tskpri);
CHECK_TSKCTX_UNL();
CHECK_TPRI_SELF(tskpri);
t_lock_cpu();
pri = (tskpri == TPRI_SELF) ? p_runtsk->priority : INT_PRIORITY(tskpri);
p_queue = &(ready_queue[pri]);
if (queue_empty(p_queue)) {
ercd = E_OK;
}
else if ((((TCB *)(p_queue->p_next))->p_tinib->tskatr & TA_RSTR) != 0U) {
ercd = E_NOSPT;
}
else {
if (rotate_ready_queue(p_queue)) {
dispatch();
}
ercd = E_OK;
}
t_unlock_cpu();
error_exit:
LOG_ROT_RDQ_LEAVE(ercd);
return(ercd);
}
开发者ID:blarryt,项目名称:toppers-asp,代码行数:32,代码来源:sys_manage.c
示例7: ini_dtq
ER
ini_dtq(ID dtqid)
{
DTQCB *p_dtqcb;
bool_t dspreq;
ER ercd;
LOG_INI_DTQ_ENTER(dtqid);
CHECK_TSKCTX_UNL();
CHECK_DTQID(dtqid);
p_dtqcb = get_dtqcb(dtqid);
t_lock_cpu();
dspreq = init_wait_queue(&(p_dtqcb->swait_queue));
if (init_wait_queue(&(p_dtqcb->rwait_queue))) {
dspreq = true;
};
p_dtqcb->count = 0U;
p_dtqcb->head = 0U;
p_dtqcb->tail = 0U;
if (dspreq) {
dispatch();
}
ercd = E_OK;
t_unlock_cpu();
error_exit:
LOG_INI_DTQ_LEAVE(ercd);
return(ercd);
}
开发者ID:bzchangguopeng,项目名称:toppers-asp,代码行数:30,代码来源:dataqueue.c
示例8: sig_sem
JSP_L1_CODE
SYSCALL ER
sig_sem(ID semid)
{
SEMCB *semcb;
TCB *tcb;
ER ercd;
LOG_SIG_SEM_ENTER(semid);
CHECK_TSKCTX_UNL();
CHECK_SEMID(semid);
semcb = get_semcb(semid);
t_lock_cpu();
if (!(queue_empty(&(semcb->wait_queue)))) {
tcb = (TCB *) queue_delete_next(&(semcb->wait_queue));
if (wait_complete(tcb)) {
dispatch();
}
ercd = E_OK;
}
else if (semcb->semcnt < semcb->seminib->maxsem) {
semcb->semcnt += 1;
ercd = E_OK;
}
else {
ercd = E_QOVR;
}
t_unlock_cpu();
exit:
LOG_SIG_SEM_LEAVE(ercd);
return(ercd);
}
开发者ID:ujinosuke,项目名称:ToppersJspForBF70x,代码行数:34,代码来源:semaphore.c
示例9: rot_rdq
ER
rot_rdq(PRI tskpri)
{
uint_t pri;
ER ercd;
bool_t dspreq = false;
PCB *my_p_pcb;
LOG_ROT_RDQ_ENTER(tskpri);
CHECK_TSKCTX_UNL();
CHECK_TPRI_SELF(tskpri);
t_lock_cpu();
my_p_pcb = t_acquire_tsk_lock_self_without_runnable_check();
pri = (tskpri == TPRI_SELF) ? my_p_pcb->p_runtsk->priority : INT_PRIORITY(tskpri);
dspreq = rotate_ready_queue(pri, my_p_pcb);
ercd = E_OK;
release_tsk_lock(my_p_pcb);
if (dspreq) {
dispatch();
}
t_unlock_cpu();
error_exit:
LOG_ROT_RDQ_LEAVE(ercd);
return(ercd);
}
开发者ID:inouema,项目名称:toppers,代码行数:27,代码来源:sys_manage.c
示例10: stp_ovr
ER
stp_ovr(ID tskid)
{
TCB *p_tcb;
ER ercd;
LOG_STP_OVR_ENTER(tskid);
CHECK_TSKCTX_UNL();
CHECK_OBJ(ovrinib.ovrhdr != NULL);
CHECK_TSKID_SELF(tskid);
p_tcb = get_tcb_self(tskid);
t_lock_cpu();
if (p_tcb->p_tinib->tskatr == TA_NOEXS) {
ercd = E_NOEXS;
}
else if (VIOLATE_ACPTN(p_tcb->p_tinib->acvct.acptn2)) {
ercd = E_OACV;
}
else {
if (p_tcb->leftotm > 0U) {
if (p_tcb == p_runtsk) {
(void) target_ovrtimer_stop();
ovrtimer_flag = false;
}
p_tcb->leftotm = 0U;
}
ercd = E_OK;
}
t_unlock_cpu();
error_exit:
LOG_STP_OVR_LEAVE(ercd);
return(ercd);
}
开发者ID:yuyaotsuka,项目名称:etrobo,代码行数:35,代码来源:overrun.c
示例11: pol_sem
JSP_L1_CODE
SYSCALL ER
pol_sem(ID semid)
{
SEMCB *semcb;
ER ercd;
LOG_POL_SEM_ENTER(semid);
CHECK_TSKCTX_UNL();
CHECK_SEMID(semid);
semcb = get_semcb(semid);
t_lock_cpu();
if (semcb->semcnt >= 1) {
semcb->semcnt -= 1;
ercd = E_OK;
}
else {
ercd = E_TMOUT;
}
t_unlock_cpu();
exit:
LOG_POL_SEM_LEAVE(ercd);
return(ercd);
}
开发者ID:ujinosuke,项目名称:ToppersJspForBF70x,代码行数:26,代码来源:semaphore.c
示例12: chg_ipm
ER
chg_ipm(PRI intpri)
{
ER ercd;
LOG_CHG_IPM_ENTER(intpri);
CHECK_TSKCTX_UNL();
CHECK_INTPRI_CHGIPM(intpri);
t_lock_cpu();
t_set_ipm(intpri);
if (intpri == TIPM_ENAALL) {
ipmflg = true;
if (!disdsp) {
dspflg = true;
if (p_runtsk != p_schedtsk) {
dispatch();
}
}
if (p_runtsk->enatex && p_runtsk->texptn != 0U) {
call_texrtn();
}
}
else {
ipmflg = false;
dspflg = false;
}
ercd = E_OK;
t_unlock_cpu();
error_exit:
LOG_CHG_IPM_LEAVE(ercd);
return(ercd);
}
开发者ID:duanlv,项目名称:asp-gr_peach_gcc-mbed,代码行数:34,代码来源:interrupt.c
示例13: del_isr
ER
del_isr(ID isrid)
{
ISRCB *p_isrcb;
ISRINIB *p_isrinib;
ER ercd;
LOG_DEL_ISR_ENTER(isrid);
CHECK_TSKCTX_UNL();
CHECK_ISRID(isrid);
p_isrcb = get_isrcb(isrid);
t_lock_cpu();
if (p_isrcb->p_isrinib->isratr == TA_NOEXS) {
ercd = E_NOEXS;
}
else {
queue_delete(&(p_isrcb->isr_queue));
p_isrinib = (ISRINIB *)(p_isrcb->p_isrinib);
p_isrinib->isratr = TA_NOEXS;
queue_insert_prev(&free_isrcb, &(p_isrcb->isr_queue));
ercd = E_OK;
}
t_unlock_cpu();
error_exit:
LOG_DEL_ISR_LEAVE(ercd);
return(ercd);
}
开发者ID:duanlv,项目名称:asp-gr_peach_gcc-mbed,代码行数:29,代码来源:interrupt.c
示例14: ref_pdq
ER
ref_pdq(ID pdqid, T_RPDQ *pk_rpdq)
{
PDQCB *p_pdqcb;
ER ercd;
LOG_REF_PDQ_ENTER(pdqid, pk_rpdq);
CHECK_TSKCTX_UNL();
CHECK_PDQID(pdqid);
CHECK_MACV_WRITE(pk_rpdq, T_RPDQ);
p_pdqcb = get_pdqcb(pdqid);
t_lock_cpu();
if (p_pdqcb->p_pdqinib->pdqatr == TA_NOEXS) {
ercd = E_NOEXS;
}
else if (VIOLATE_ACPTN(p_pdqcb->p_pdqinib->acvct.acptn4)) {
ercd = E_OACV;
}
else {
pk_rpdq->stskid = wait_tskid(&(p_pdqcb->swait_queue));
pk_rpdq->rtskid = wait_tskid(&(p_pdqcb->rwait_queue));
pk_rpdq->spdqcnt = p_pdqcb->count;
ercd = E_OK;
}
t_unlock_cpu();
error_exit:
LOG_REF_PDQ_LEAVE(ercd, pk_rpdq);
return(ercd);
}
开发者ID:yuyaotsuka,项目名称:etrobo,代码行数:31,代码来源:pridataq.c
示例15: ena_tex
JSP_L1_CODE
SYSCALL ER
ena_tex()
{
ER ercd;
LOG_ENA_TEX_ENTER();
CHECK_TSKCTX_UNL();
t_lock_cpu();
if (runtsk->tinib->texrtn == NULL) {
ercd = E_OBJ;
}
else {
runtsk->enatex = TRUE;
if (runtsk->texptn != 0) {
call_texrtn();
}
ercd = E_OK;
}
t_unlock_cpu();
exit:
LOG_ENA_TEX_LEAVE(ercd);
return(ercd);
}
开发者ID:ujinosuke,项目名称:ToppersJspForBF70x,代码行数:26,代码来源:task_except.c
示例16: mrot_rdq
ER
mrot_rdq(PRI tskpri, ID prcid)
{
uint_t pri;
ER ercd;
bool_t dspreq = false;
PCB *p_pcb;
LOG_MROT_RDQ_ENTER(tskpri, prcid);
CHECK_TSKCTX_UNL();
CHECK_TPRI_SELF(tskpri);
CHECK_PRCID(prcid);
t_lock_cpu();
p_pcb = t_acquire_tsk_lock_prcid(prcid);
pri = (tskpri == TPRI_SELF) ? (get_my_p_pcb())->p_runtsk->priority : INT_PRIORITY(tskpri);
if (rotate_ready_queue(pri, p_pcb)) {
dspreq = dispatch_request(p_pcb);
}
ercd = E_OK;
release_tsk_lock(p_pcb);
if (dspreq) {
dispatch();
}
t_unlock_cpu();
error_exit:
LOG_MROT_RDQ_LEAVE(ercd);
return(ercd);
}
开发者ID:inouema,项目名称:toppers,代码行数:30,代码来源:sys_manage.c
示例17: ras_tex
JSP_L1_CODE
SYSCALL ER
ras_tex(ID tskid, TEXPTN rasptn)
{
TCB *tcb;
ER ercd;
LOG_RAS_TEX_ENTER(tskid, rasptn);
CHECK_TSKCTX_UNL();
CHECK_TSKID_SELF(tskid);
CHECK_PAR(rasptn != 0);
tcb = get_tcb_self(tskid);
t_lock_cpu();
if (TSTAT_DORMANT(tcb->tstat) || tcb->tinib->texrtn == NULL) {
ercd = E_OBJ;
}
else {
tcb->texptn |= rasptn;
if (tcb == runtsk && runtsk->enatex) {
call_texrtn();
}
ercd = E_OK;
}
t_unlock_cpu();
exit:
LOG_RAS_TEX_LEAVE(ercd);
return(ercd);
}
开发者ID:ujinosuke,项目名称:ToppersJspForBF70x,代码行数:30,代码来源:task_except.c
示例18: ena_dsp
ER
ena_dsp(void)
{
ER ercd;
bool_t dspreq = false;
PCB *my_p_pcb;
LOG_ENA_DSP_ENTER();
CHECK_TSKCTX_UNL();
t_lock_cpu();
my_p_pcb = t_acquire_tsk_lock_self_without_runnable_check();
my_p_pcb->disdsp = false;
if (t_get_ipm() == TIPM_ENAALL) {
my_p_pcb->dspflg = true;
if (my_p_pcb->p_runtsk != my_p_pcb->p_schedtsk) {
dspreq = true;
}
}
ercd = E_OK;
release_tsk_lock(my_p_pcb);
if (dspreq) {
dispatch();
}
t_unlock_cpu();
error_exit:
LOG_ENA_DSP_LEAVE(ercd);
return(ercd);
}
开发者ID:inouema,项目名称:toppers,代码行数:30,代码来源:sys_manage.c
示例19: prcv_dtq
ER
prcv_dtq(ID dtqid, intptr_t *p_data)
{
DTQCB *p_dtqcb;
bool_t reqdsp;
ER ercd;
LOG_PRCV_DTQ_ENTER(dtqid, p_data);
CHECK_TSKCTX_UNL();
CHECK_DTQID(dtqid);
p_dtqcb = get_dtqcb(dtqid);
t_lock_cpu();
if (receive_data(p_dtqcb, p_data, &reqdsp)) {
if (reqdsp) {
dispatch();
}
ercd = E_OK;
}
else {
ercd = E_TMOUT;
}
t_unlock_cpu();
error_exit:
LOG_PRCV_DTQ_LEAVE(ercd, *p_data);
return(ercd);
}
开发者ID:bzchangguopeng,项目名称:toppers-asp,代码行数:28,代码来源:dataqueue.c
示例20: set_flg
SYSCALL ER
set_flg(ID flgid, FLGPTN setptn)
{
FLGCB *flgcb;
TCB *tcb;
WINFO_FLG *winfo;
ER ercd;
LOG_SET_FLG_ENTER(flgid, setptn);
CHECK_TSKCTX_UNL();
CHECK_FLGID(flgid);
flgcb = get_flgcb(flgid);
t_lock_cpu();
flgcb->flgptn |= setptn;
if (!(queue_empty(&(flgcb->wait_queue)))) {
tcb = (TCB *)(flgcb->wait_queue.next);
winfo = (WINFO_FLG *)(tcb->winfo);
if (eventflag_cond(flgcb, winfo->waiptn,
winfo->wfmode, &(winfo->flgptn))) {
queue_delete(&(tcb->task_queue));
if (wait_complete(tcb)) {
dispatch();
}
}
}
ercd = E_OK;
t_unlock_cpu();
exit:
LOG_SET_FLG_LEAVE(ercd);
return(ercd);
}
开发者ID:Han40,项目名称:spamOSEK,代码行数:33,代码来源:eventflag.c
注:本文中的CHECK_TSKCTX_UNL函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论