void task1(intptr_t exinf) { ER_UINT ercd; T_RTSK rtsk; T_RMTX rmtx; test_start(__FILE__); set_bit_func(bit_kernel); check_point(1); ercd = act_tsk(TASK2); check_ercd(ercd, E_OK); ercd = sta_alm(ALM1, TEST_TIME_CP); check_ercd(ercd, E_OK); ercd = slp_tsk(); check_ercd(ercd, E_OK); check_point(4); ercd = loc_cpu(); check_ercd(ercd, E_OK); ercd = ras_ter(TASK2); check_ercd(ercd, E_CTX); ercd = unl_cpu(); check_ercd(ercd, E_OK); check_point(5); ercd = ras_ter(0U); check_ercd(ercd, E_ID); ercd = ras_ter(TNUM_TSKID + 1); check_ercd(ercd, E_ID); ercd = ras_ter(TASK1); check_ercd(ercd, E_ILUSE); ercd = ras_ter(TASK3); check_ercd(ercd, E_OBJ); check_point(6); ercd = ref_tsk(TASK2, &rtsk); check_ercd(ercd, E_OK); check_assert(rtsk.tskstat == TTS_RDY); check_point(7); ercd = ras_ter(TASK2); check_ercd(ercd, E_OK); check_point(8); ercd = ref_tsk(TASK2, &rtsk); check_ercd(ercd, E_OK); check_assert(rtsk.tskstat == TTS_DMT); check_point(9); ercd = act_tsk(TASK3); check_ercd(ercd, E_OK); check_point(12); ercd = ref_tsk(TASK3, &rtsk); check_ercd(ercd, E_OK); check_assert(rtsk.tskstat == TTS_WAI); ercd = ref_mtx(MTX1, &rmtx); check_ercd(ercd, E_OK); check_assert(rmtx.htskid == TASK3); check_assert(rmtx.wtskid == TSK_NONE); check_point(13); ercd = ras_ter(TASK3); check_ercd(ercd, E_OK); check_point(14); ercd = ref_tsk(TASK3, &rtsk); check_ercd(ercd, E_OK); check_assert(rtsk.tskstat == TTS_DMT); ercd = ref_mtx(MTX1, &rmtx); check_ercd(ercd, E_OK); check_assert(rmtx.htskid == TSK_NONE); check_assert(rmtx.wtskid == TSK_NONE); check_point(15); ercd = act_tsk(TASK3); check_ercd(ercd, E_OK); check_point(18); ercd = act_tsk(TASK4); check_ercd(ercd, E_OK); check_point(20); ercd = ref_tsk(TASK3, &rtsk); check_ercd(ercd, E_OK); check_assert(rtsk.tskstat == TTS_WAI); ercd = ref_mtx(MTX1, &rmtx); check_ercd(ercd, E_OK); check_assert(rmtx.htskid == TASK3); check_assert(rmtx.wtskid == TASK4); check_point(21); ercd = ras_ter(TASK3); check_ercd(ercd, E_OK); check_point(24); ercd = act_tsk(TASK2); check_ercd(ercd, E_OK); ercd = act_tsk(TASK2); check_ercd(ercd, E_OK); check_point(25); ercd = ref_tsk(TASK2, &rtsk); check_ercd(ercd, E_OK); check_assert(rtsk.tskstat == TTS_RDY); check_assert(rtsk.actcnt == 1U); check_point(26); ercd = ras_ter(TASK2); check_ercd(ercd, E_OK); check_point(27); ercd = ref_tsk(TASK2, &rtsk); check_ercd(ercd, E_OK); check_assert(rtsk.tskstat == TTS_RDY); check_assert(rtsk.actcnt == 0U); check_point(28); ercd = act_tsk(TASK3); check_ercd(ercd, E_OK); check_point(30); ercd = act_tsk(TASK3); check_ercd(ercd, E_OK); check_point(31); ercd = ref_tsk(TASK3, &rtsk); check_ercd(ercd, E_OK); check_assert(rtsk.tskstat == TTS_WAI); check_assert(rtsk.actcnt == 1U); check_point(32); ercd = ras_ter(TASK3); check_ercd(ercd, E_OK); check_point(34); ercd = act_tsk(TASK2); check_ercd(ercd, E_OK); ercd = slp_tsk(); check_ercd(ercd, E_OK); check_point(36); ercd = ref_tsk(TASK2, &rtsk); check_ercd(ercd, E_OK); check_assert(rtsk.tskstat == TTS_RDY); check_assert(rtsk.raster == false); check_assert(rtsk.dister == true); check_point(37); ercd = ras_ter(TASK2); check_ercd(ercd, E_OK); check_point(38); ercd = ref_tsk(TASK2, &rtsk); check_ercd(ercd, E_OK); check_assert(rtsk.tskstat == TTS_RDY); check_assert(rtsk.raster == true); check_assert(rtsk.dister == true); check_point(39); ercd = ter_tsk(TASK2); check_ercd(ercd, E_OK); ercd = act_tsk(TASK2); check_ercd(ercd, E_OK); check_point(40); ercd = ref_tsk(TASK2, &rtsk); check_ercd(ercd, E_OK); check_assert(rtsk.tskstat == TTS_RDY); check_assert(rtsk.raster == false); check_assert(rtsk.dister == false); ercd = tslp_tsk(TEST_TIME_CP); check_ercd(ercd, E_TMOUT); check_point(42); ercd = ref_tsk(TASK2, &rtsk); check_ercd(ercd, E_OK); check_assert(rtsk.tskstat == TTS_WAI); check_assert(rtsk.raster == false); check_assert(rtsk.dister == true); check_point(43); ercd = ras_ter(TASK2); check_ercd(ercd, E_OK); check_point(44); ercd = ref_tsk(TASK2, &rtsk); check_ercd(ercd, E_OK); check_assert(rtsk.tskstat == TTS_RDY); check_assert(rtsk.raster == true); check_assert(rtsk.dister == true); ercd = slp_tsk(); check_ercd(ercd, E_OK); check_point(46); ercd = act_tsk(TASK3); check_ercd(ercd, E_OK); check_point(48); ercd = ref_tsk(TASK3, &rtsk); check_ercd(ercd, E_OK); check_assert(rtsk.tskstat == TTS_WAI); check_assert(rtsk.raster == false); check_assert(rtsk.dister == true); check_point(49); ercd = ras_ter(TASK3); check_ercd(ercd, E_OK); check_point(52); ercd = ref_tsk(TASK3, &rtsk); check_ercd(ercd, E_OK); check_assert(rtsk.tskstat == TTS_DMT); check_point(53); ercd = act_tsk(TASK3); check_ercd(ercd, E_OK); check_point(55); ercd = ref_tsk(TASK3, &rtsk); check_ercd(ercd, E_OK); check_assert(rtsk.tskstat == TTS_SUS); check_point(56); ercd = ras_ter(TASK3); check_ercd(ercd, E_OK); check_point(58); ercd = ref_tsk(TASK3, &rtsk); check_ercd(ercd, E_OK); check_assert(rtsk.tskstat == TTS_DMT); check_finish(59); check_point(0); }
void task1(intptr_t exinf) { ER_UINT ercd; PRI tskpri; test_start(__FILE__); set_bit_func(bit_mutex); check_point(1); ercd = dis_dsp(); check_ercd(ercd, E_OK); check_point(2); ercd = act_tsk(TASK2); check_ercd(ercd, E_OK); ercd = act_tsk(TASK4); check_ercd(ercd, E_OK); check_point(3); ercd = ploc_mtx(MTX2); check_ercd(ercd, E_OK); ercd = get_pri(TSK_SELF, &tskpri); check_ercd(ercd, E_OK); check_assert(tskpri == HIGH_PRIORITY); check_point(4); ercd = ena_dsp(); check_ercd(ercd, E_OK); check_point(5); ercd = unl_mtx(MTX2); check_ercd(ercd, E_OK); check_point(8); ercd = get_pri(TSK_SELF, &tskpri); check_ercd(ercd, E_OK); check_assert(tskpri == MID_PRIORITY); check_point(9); ercd = dis_dsp(); check_ercd(ercd, E_OK); check_point(10); ercd = rot_rdq(MID_PRIORITY); check_ercd(ercd, E_OK); check_point(11); ercd = act_tsk(TASK3); check_ercd(ercd, E_OK); check_point(12); ercd = ploc_mtx(MTX1); check_ercd(ercd, E_OK); ercd = get_pri(TSK_SELF, &tskpri); check_ercd(ercd, E_OK); check_assert(tskpri == MID_PRIORITY); check_point(13); ercd = ena_dsp(); check_ercd(ercd, E_OK); check_point(15); ercd = slp_tsk(); check_ercd(ercd, E_OK); check_point(18); ercd = wup_tsk(TASK2); check_ercd(ercd, E_OK); check_point(19); ercd = dis_dsp(); check_ercd(ercd, E_OK); check_point(20); ercd = rot_rdq(MID_PRIORITY); check_ercd(ercd, E_OK); check_point(21); ercd = wup_tsk(TASK3); check_ercd(ercd, E_OK); check_point(22); ercd = unl_mtx(MTX1); check_ercd(ercd, E_OK); ercd = get_pri(TSK_SELF, &tskpri); check_ercd(ercd, E_OK); check_assert(tskpri == MID_PRIORITY); check_point(23); ercd = ena_dsp(); check_ercd(ercd, E_OK); check_point(25); ercd = slp_tsk(); check_ercd(ercd, E_OK); check_point(28); ercd = dis_dsp(); check_ercd(ercd, E_OK); check_point(29); ercd = wup_tsk(TASK4); check_ercd(ercd, E_OK); check_point(30); ercd = ploc_mtx(MTX2); check_ercd(ercd, E_OK); check_point(31); ercd = rot_rdq(HIGH_PRIORITY); check_ercd(ercd, E_OK); check_point(32); ercd = act_tsk(TASK5); check_ercd(ercd, E_OK); check_point(33); ercd = ploc_mtx(MTX1); check_ercd(ercd, E_OK); ercd = get_pri(TSK_SELF, &tskpri); check_ercd(ercd, E_OK); check_assert(tskpri == HIGH_PRIORITY); check_point(34); ercd = ena_dsp(); check_ercd(ercd, E_OK); check_point(36); ercd = slp_tsk(); check_ercd(ercd, E_OK); check_point(39); ercd = dis_dsp(); check_ercd(ercd, E_OK); check_point(40); ercd = wup_tsk(TASK4); check_ercd(ercd, E_OK); check_point(41); ercd = rot_rdq(HIGH_PRIORITY); check_ercd(ercd, E_OK); check_point(42); ercd = wup_tsk(TASK5); check_ercd(ercd, E_OK); check_point(43); ercd = unl_mtx(MTX1); check_ercd(ercd, E_OK); ercd = get_pri(TSK_SELF, &tskpri); check_ercd(ercd, E_OK); check_assert(tskpri == HIGH_PRIORITY); check_point(44); ercd = ena_dsp(); check_ercd(ercd, E_OK); check_point(46); ercd = slp_tsk(); check_ercd(ercd, E_OK); check_point(49); ercd = wup_tsk(TASK2); check_ercd(ercd, E_OK); ercd = wup_tsk(TASK3); check_ercd(ercd, E_OK); ercd = slp_tsk(); check_ercd(ercd, E_OK); check_point(52); ercd = unl_mtx(MTX2); check_ercd(ercd, E_OK); ercd = get_pri(TASK2, &tskpri); check_ercd(ercd, E_OK); check_assert(tskpri == HIGH_PRIORITY); check_point(53); ercd = loc_mtx(MTX3); check_ercd(ercd, E_OK); ercd = chg_pri(TASK1, TPRI_INI); check_ercd(ercd, E_OK); check_point(54); ercd = loc_mtx(MTX1); check_ercd(ercd, E_OK); check_point(55); ercd = slp_tsk(); check_ercd(ercd, E_OK); check_point(58); ercd = unl_mtx(MTX1); check_ercd(ercd, E_OK); ercd = get_pri(TASK2, &tskpri); check_ercd(ercd, E_OK); check_assert(tskpri == HIGH_PRIORITY); check_point(59); ercd = unl_mtx(MTX3); check_ercd(ercd, E_OK); check_point(64); ercd = loc_mtx(MTX1); check_ercd(ercd, E_OK); check_finish(69); check_point(0); }
void task1(intptr_t exinf) { ER ercd; T_RTSK rtsk; T_RMTX rmtx; set_bit_func(bit_mutex); check_point(1); ercd = ref_mtx(MTX1, &rmtx); check_ercd(ercd, E_OK); check_assert(rmtx.htskid == TSK_NONE); check_assert(rmtx.wtskid == TSK_NONE); ercd = loc_mtx(MTX1); check_ercd(ercd, E_OK); check_point(2); ercd = ref_tsk(TASK1, &rtsk); check_ercd(ercd, E_OK); check_assert(rtsk.tskpri == HIGH_PRIORITY); check_assert(rtsk.tskbpri == LOW_PRIORITY); ercd = loc_mtx(MTX1); check_ercd(ercd, E_ILUSE); check_point(3); ercd = ref_mtx(MTX1, &rmtx); check_ercd(ercd, E_OK); check_assert(rmtx.htskid == TASK1); check_assert(rmtx.wtskid == TSK_NONE); ercd = act_tsk(TASK2); check_ercd(ercd, E_OK); check_point(4); ercd = tslp_tsk(10); check_ercd(ercd, E_TMOUT); check_point(6); ercd = ref_mtx(MTX1, &rmtx); check_ercd(ercd, E_OK); check_assert(rmtx.htskid == TASK1); check_assert(rmtx.wtskid == TASK2); ercd = act_tsk(TASK3); check_ercd(ercd, E_OK); check_point(7); ercd = tslp_tsk(10); check_ercd(ercd, E_TMOUT); check_point(10); ercd = ref_mtx(MTX1, &rmtx); check_ercd(ercd, E_OK); check_assert(rmtx.htskid == TASK1); check_assert(rmtx.wtskid == TASK3); ercd = dis_dsp(); check_ercd(ercd, E_OK); ercd = unl_mtx(MTX1); check_ercd(ercd, E_OK); check_point(11); ercd = ref_tsk(TASK1, &rtsk); check_ercd(ercd, E_OK); check_assert(rtsk.tskpri == LOW_PRIORITY); check_assert(rtsk.tskbpri == LOW_PRIORITY); ercd = ref_mtx(MTX1, &rmtx); check_ercd(ercd, E_OK); check_assert(rmtx.htskid == TASK3); check_assert(rmtx.wtskid == TASK2); ercd = ena_dsp(); check_ercd(ercd, E_OK); check_point(16); ercd = ref_mtx(MTX1, &rmtx); check_ercd(ercd, E_OK); check_assert(rmtx.htskid == TASK2); check_assert(rmtx.wtskid == TSK_NONE); ercd = tloc_mtx(MTX1, 10); check_ercd(ercd, E_TMOUT); check_point(17); ercd = wup_tsk(TASK2); check_ercd(ercd, E_OK); check_finish(20); check_point(0); }
void task1(intptr_t exinf) { ER_UINT ercd; test_start(__FILE__); set_bit_func(bit_kernel); check_point(1); ercd = act_tsk(TASK2); check_ercd(ercd, E_OK); ercd = act_tsk(TASK3); check_ercd(ercd, E_OK); ercd = tslp_tsk(1000U); check_ercd(ercd, E_TMOUT); check_point(4); ercd = ter_tsk(TASK2); check_ercd(ercd, E_OK); ercd = tslp_tsk(1000U); check_ercd(ercd, E_TMOUT); check_point(5); ercd = rcv_mbf(MBF1, buf1); check_ercd(ercd, 26); check_assert(strncmp(buf1, string2, 26) == 0); ercd = act_tsk(TASK2); check_ercd(ercd, E_OK); ercd = tslp_tsk(1000U); check_ercd(ercd, E_TMOUT); check_point(8); ercd = ter_tsk(TASK2); check_ercd(ercd, E_OK); ercd = slp_tsk(); check_ercd(ercd, E_OK); check_point(13); ercd = snd_mbf(MBF1, string3, 10); check_ercd(ercd, E_OK); check_point(15); ercd = rcv_mbf(MBF1, buf1); check_ercd(ercd, 10); check_assert(strncmp(buf1, string3, 10) == 0); ercd = act_tsk(TASK2); check_ercd(ercd, E_OK); ercd = tslp_tsk(1000U); check_ercd(ercd, E_TMOUT); check_point(18); ercd = rel_wai(TASK2); check_ercd(ercd, E_OK); ercd = tslp_tsk(1000U); check_ercd(ercd, E_TMOUT); check_point(20); ercd = rcv_mbf(MBF1, buf1); check_ercd(ercd, 26); check_assert(strncmp(buf1, string2, 26) == 0); ercd = wup_tsk(TASK2); check_ercd(ercd, E_OK); ercd = tslp_tsk(1000U); check_ercd(ercd, E_TMOUT); check_point(23); ercd = rel_wai(TASK2); check_ercd(ercd, E_OK); ercd = slp_tsk(); check_ercd(ercd, E_OK); check_point(29); ercd = snd_mbf(MBF1, string3, 10); check_ercd(ercd, E_OK); check_point(31); ercd = rcv_mbf(MBF1, buf1); check_ercd(ercd, 10); check_assert(strncmp(buf1, string3, 10) == 0); ercd = tslp_tsk(1000U); check_ercd(ercd, E_TMOUT); check_point(34); ercd = sta_alm(ALM1, 1000U); check_ercd(ercd, E_OK); ercd = slp_tsk(); check_ercd(ercd, E_OK); check_point(36); ercd = tslp_tsk(1000U); check_ercd(ercd, E_TMOUT); check_point(38); ercd = rcv_mbf(MBF1, buf1); check_ercd(ercd, 26); check_assert(strncmp(buf1, string2, 26) == 0); ercd = wup_tsk(TASK2); check_ercd(ercd, E_OK); ercd = tslp_tsk(1000U); check_ercd(ercd, E_TMOUT); check_point(41); ercd = sta_alm(ALM1, 1000U); check_ercd(ercd, E_OK); ercd = slp_tsk(); check_ercd(ercd, E_OK); check_point(48); ercd = snd_mbf(MBF1, string3, 10); check_ercd(ercd, E_OK); check_point(51); ercd = rcv_mbf(MBF1, buf1); check_ercd(ercd, 10); check_assert(strncmp(buf1, string3, 10) == 0); ercd = wup_tsk(TASK3); check_ercd(ercd, E_OK); ercd = slp_tsk(); check_ercd(ercd, E_OK); check_point(63); ercd = snd_mbf(MBF1, string3, 10); check_ercd(ercd, E_OK); check_point(65); ercd = rcv_mbf(MBF1, buf1); check_ercd(ercd, 10); check_assert(strncmp(buf1, string3, 10) == 0); ercd = slp_tsk(); check_ercd(ercd, E_OK); check_point(0); }
void task1(intptr_t exinf) { ER_UINT ercd; T_RMTX rmtx; test_start(__FILE__); set_bit_func(bit_mutex); check_point(1); ercd = ref_mtx(MTX1, &rmtx); check_ercd(ercd, E_OK); check_assert(rmtx.htskid == TSK_NONE); check_assert(rmtx.wtskid == TSK_NONE); ercd = loc_mtx(MTX1); check_ercd(ercd, E_OK); check_point(2); ercd = loc_mtx(MTX1); check_ercd(ercd, E_OBJ); check_point(3); ercd = ref_mtx(MTX1, &rmtx); check_ercd(ercd, E_OK); check_assert(rmtx.htskid == TASK1); check_assert(rmtx.wtskid == TSK_NONE); ercd = act_tsk(TASK2); check_ercd(ercd, E_OK); check_point(5); ercd = ref_mtx(MTX1, &rmtx); check_ercd(ercd, E_OK); check_assert(rmtx.htskid == TASK1); check_assert(rmtx.wtskid == TASK2); ercd = act_tsk(TASK3); check_ercd(ercd, E_OK); check_point(8); ercd = ref_mtx(MTX1, &rmtx); check_ercd(ercd, E_OK); check_assert(rmtx.htskid == TASK1); check_assert(rmtx.wtskid == TASK2); ercd = dis_dsp(); check_ercd(ercd, E_OK); ercd = unl_mtx(MTX1); check_ercd(ercd, E_OK); check_point(9); ercd = ref_mtx(MTX1, &rmtx); check_ercd(ercd, E_OK); check_assert(rmtx.htskid == TASK2); check_assert(rmtx.wtskid == TASK3); ercd = ena_dsp(); check_ercd(ercd, E_OK); check_point(14); ercd = ref_mtx(MTX1, &rmtx); check_ercd(ercd, E_OK); check_assert(rmtx.htskid == TASK2); check_assert(rmtx.wtskid == TSK_NONE); ercd = tloc_mtx(MTX1, 3 * TEST_TIME_CP); check_ercd(ercd, E_TMOUT); check_point(15); ercd = wup_tsk(TASK2); check_ercd(ercd, E_OK); check_finish(18); check_point(0); }
void task1(intptr_t exinf) { ER_UINT ercd; test_start(__FILE__); set_bit_func(bit_mutex); check_point(1); ercd = loc_mtx(MTX1); check_ercd(ercd, E_OK); check_point(2); ercd = act_tsk(TASK2); check_ercd(ercd, E_OK); check_point(3); ercd = act_tsk(TASK5); check_ercd(ercd, E_OK); check_point(6); ercd = sus_tsk(TASK2); check_ercd(ercd, E_OK); check_point(7); ercd = loc_mtx(MTX1); check_ercd(ercd, E_OK); ercd = loc_mtx(MTX2); check_ercd(ercd, E_OK); check_point(8); ercd = act_tsk(TASK3); check_ercd(ercd, E_OK); check_point(9); ercd = dis_dsp(); check_ercd(ercd, E_OK); check_point(10); ercd = rot_rdq(MID_PRIORITY); check_ercd(ercd, E_OK); check_point(11); ercd = act_tsk(TASK4); check_ercd(ercd, E_OK); check_point(12); ercd = wup_tsk(TASK5); check_ercd(ercd, E_OK); check_point(13); ercd = ena_dsp(); check_ercd(ercd, E_OK); check_point(17); ercd = slp_tsk(); check_ercd(ercd, E_OK); check_point(20); ercd = loc_mtx(MTX3); check_ercd(ercd, E_OK); check_point(21); ercd = wup_tsk(TASK3); check_ercd(ercd, E_OK); check_point(22); ercd = dis_dsp(); check_ercd(ercd, E_OK); check_point(23); ercd = rot_rdq(MID_PRIORITY); check_ercd(ercd, E_OK); check_point(24); ercd = wup_tsk(TASK4); check_ercd(ercd, E_OK); check_point(25); ercd = wup_tsk(TASK5); check_ercd(ercd, E_OK); check_point(26); ercd = ena_dsp(); check_ercd(ercd, E_OK); check_point(30); ercd = slp_tsk(); check_ercd(ercd, E_OK); check_point(33); ercd = rsm_tsk(TASK2); check_ercd(ercd, E_OK); check_point(34); ercd = ini_mtx(MTX2); check_ercd(ercd, E_OK); check_point(37); ercd = wup_tsk(TASK5); check_ercd(ercd, E_OK); check_point(40); ercd = loc_mtx(MTX1); check_ercd(ercd, E_OK); check_point(41); ercd = loc_mtx(MTX4); check_ercd(ercd, E_OK); check_point(47); ercd = unl_mtx(MTX4); check_ercd(ercd, E_OK); check_point(48); ercd = wup_tsk(TASK5); check_ercd(ercd, E_OK); check_point(51); ercd = wup_tsk(TASK3); check_ercd(ercd, E_OK); check_point(53); ercd = loc_mtx(MTX1); check_ercd(ercd, E_OK); ercd = loc_mtx(MTX2); check_ercd(ercd, E_OK); check_point(54); ercd = loc_mtx(MTX4); check_ercd(ercd, E_OK); check_point(62); ercd = unl_mtx(MTX4); check_ercd(ercd, E_OK); check_point(65); ercd = slp_tsk(); check_ercd(ercd, E_OK); check_point(73); ercd = loc_mtx(MTX3); check_ercd(ercd, E_OK); check_point(74); ercd = loc_mtx(MTX4); check_ercd(ercd, E_OK); check_point(82); ercd = unl_mtx(MTX4); check_ercd(ercd, E_OK); check_point(85); ercd = unl_mtx(MTX2); check_ercd(ercd, E_OK); check_point(87); ercd = sus_tsk(TASK2); check_ercd(ercd, E_OK); check_point(88); ercd = loc_mtx(MTX1); check_ercd(ercd, E_OK); check_point(89); ercd = wup_tsk(TASK3); check_ercd(ercd, E_OK); check_point(90); ercd = rot_rdq(MID_PRIORITY); check_ercd(ercd, E_OK); check_point(92); ercd = wup_tsk(TASK5); check_ercd(ercd, E_OK); check_point(98); ercd = loc_mtx(MTX1); check_ercd(ercd, E_OK); check_point(99); ercd = wup_tsk(TASK3); check_ercd(ercd, E_OK); check_point(100); ercd = rot_rdq(MID_PRIORITY); check_ercd(ercd, E_OK); check_point(102); ercd = rsm_tsk(TASK2); check_ercd(ercd, E_OK); check_point(103); ercd = slp_tsk(); check_ercd(ercd, E_OK); check_point(0); }
void task1(intptr_t exinf) { ER ercd; T_RMTX rmtx; set_bit_func(bit_mutex); check_point(1); ercd = act_tsk(TASK2); check_ercd(ercd, E_OK); check_point(2); ercd = rot_rdq(TPRI_SELF); check_ercd(ercd, E_OK); check_point(5); ercd = ref_mtx(MTX1, &rmtx); check_ercd(ercd, E_OK); check_assert(rmtx.htskid == TSK_NONE); check_assert(rmtx.wtskid == TSK_NONE); check_point(6); ercd = act_tsk(TASK2); check_ercd(ercd, E_OK); ercd = act_tsk(TASK3); check_ercd(ercd, E_OK); check_point(7); ercd = rot_rdq(TPRI_SELF); check_ercd(ercd, E_OK); check_point(11); ercd = wup_tsk(TASK2); check_ercd(ercd, E_OK); check_point(14); ercd = act_tsk(TASK2); check_ercd(ercd, E_OK); check_point(15); ercd = rot_rdq(TPRI_SELF); check_ercd(ercd, E_OK); check_point(18); ercd = ref_mtx(MTX1, &rmtx); check_ercd(ercd, E_OK); check_assert(rmtx.htskid == TSK_NONE); check_assert(rmtx.wtskid == TSK_NONE); ercd = ref_mtx(MTX2, &rmtx); check_ercd(ercd, E_OK); check_assert(rmtx.htskid == TSK_NONE); check_assert(rmtx.wtskid == TSK_NONE); check_point(19); ercd = act_tsk(TASK2); check_ercd(ercd, E_OK); ercd = wup_tsk(TASK3); check_ercd(ercd, E_OK); ercd = act_tsk(TASK4); check_ercd(ercd, E_OK); check_point(20); ercd = rot_rdq(TPRI_SELF); check_ercd(ercd, E_OK); check_point(25); ercd = chg_pri(TSK_SELF, TPRI_INI); check_ercd(ercd, E_OK); check_point(28); ercd = wup_tsk(TASK2); check_ercd(ercd, E_OK); check_finish(32); check_point(0); }