Index: asp3_wo_tecs/trunk/test/test_notify1.c
===================================================================
--- asp3_wo_tecs/trunk/test/test_notify1.c	(revision 302)
+++ asp3_wo_tecs/trunk/test/test_notify1.c	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2015-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_notify1.c 463 2015-10-18 14:25:55Z ertl-hiro $
+ *  $Id: test_notify1.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -119,5 +119,5 @@
  *
  *	== TASK1 ==
- *	1:	sta_alm(ALM1, ALM_RELTIM)
+ *	1:	sta_alm(ALM1, TEST_TIME_PROC) ... ref_almã§åä½ç¢ºèªããã¾ã§
  *		assert(event_variable == false)
  *		ref_alm(ALM1, &ralm)
@@ -126,5 +126,5 @@
  *	2:	ref_alm(ALM1, &ralm)
  *		assert((ralm.almstat & TALM_STP) != 0U)
- *	3:	sta_alm(ALM2, ALM_RELTIM)
+ *	3:	sta_alm(ALM2, TEST_TIME_CP) ... TASK2-1ãå®è¡éå§ããã¾ã§
  *		ref_tsk(TASK2, &rtsk)
  *		assert((rtsk.tskstat & TTS_DMT) != 0U)
@@ -137,5 +137,5 @@
  *	6:	wup_tsk(TASK1)
  *	== TASK1ï¼ç¶ãï¼==
- *	7:	sta_alm(ALM3, ALM_RELTIM)
+ *	7:	sta_alm(ALM3, TEST_TIME_CP) ... TASK2-1ãå®è¡åéããã¾ã§
  *		ref_tsk(TASK2, &rtsk)
  *		assert((rtsk.tskstat & TTS_RDY) != 0U)
@@ -149,22 +149,22 @@
  *	11:	wup_tsk(TASK1)
  *	== TASK1ï¼ç¶ãï¼==
- *	12:	dly_tsk(1000U)
+ *	12:	dly_tsk(TEST_TIME_CP) ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2-1ï¼ç¶ãï¼==
  *	13:	ext_tsk()
  *	== TASK1ï¼ç¶ãï¼==
- *	14:	sta_alm(ALM3, ALM_RELTIM)
+ *	14:	sta_alm(ALM3, TEST_TIME_PROC) ... ããã«çºçãã¦ãè¯ã
  *		DO(wait_error())								... (B-1)
  *		assert(error_variable == E_OBJ)
- *	15:	sta_alm(ALM4, ALM_RELTIM)
+ *	15:	sta_alm(ALM4, TEST_TIME_PROC) ... ref_almã§åä½ç¢ºèªããã¾ã§
  *		ref_sem(SEM1, &rsem)
  *		assert(rsem.semcnt == 0U)
  *		ref_alm(ALM4, &ralm)
  *		assert((ralm.almstat & TALM_STA) != 0U)
- *	16:	dly_tsk(ALM_RELTIM * 2)
+ *	16:	dly_tsk(2 * TEST_TIME_PROC) ... ALM4ãå®è¡ãããã¾ã§
  *	17:	ref_sem(SEM1, &rsem)							... (A-5)
  *		assert(rsem.semcnt == 1U)
  *		ref_alm(ALM4, &ralm)
  *		assert((ralm.almstat & TALM_STP) != 0U)
- *	18:	sta_alm(ALM4, ALM_RELTIM)
+ *	18:	sta_alm(ALM4, TEST_TIME_CP) ... TASK2-2ãå®è¡éå§ããã¾ã§
  *	19:	slp_tsk()
  *	== TASK2-2ï¼2åç®ï¼==
@@ -172,5 +172,5 @@
  *	== TASK1ï¼ç¶ãï¼==
  *	21:	pol_sem(SEM1)
- *	22:	sta_alm(ALM5, ALM_RELTIM)
+ *	22:	sta_alm(ALM5, 2 * TEST_TIME_CP) ... TASK1ãå®è¡éå§ããã¾ã§
  *		ref_flg(FLG1, &rflg)
  *		assert(rflg.flgptn == 0x00U)
@@ -184,15 +184,15 @@
  *		ref_alm(ALM5, &ralm)
  *		assert((ralm.almstat & TALM_STP) != 0U)
- *	26:	sta_alm(ALM6, ALM_RELTIM)
+ *	26:	sta_alm(ALM6, TEST_TIME_CP) ... ref_almã§åä½ç¢ºèªããã¾ã§
  *		ref_dtq(DTQ1, &rdtq)
  *		assert(rdtq.sdtqcnt == 0U)
  *		ref_alm(ALM6, &ralm)
  *		assert((ralm.almstat & TALM_STA) != 0U)
- *	27:	dly_tsk(ALM_RELTIM * 2)
+ *	27:	dly_tsk(2 * TEST_TIME_CP) ... ALM6ãå®è¡ãããã¾ã§
  *	28:	ref_dtq(DTQ1, &rdtq)							... (A-7)
  *		assert(rdtq.sdtqcnt == 1U)
  *		ref_alm(ALM6, &ralm)
  *		assert((ralm.almstat & TALM_STP) != 0U)
- *	29:	sta_alm(ALM6, ALM_RELTIM)
+ *	29:	sta_alm(ALM6, TEST_TIME_CP) ... TASK2-2ãå®è¡éå§ããã¾ã§
  *	30:	slp_tsk()
  *	== TASK2-2ï¼ç¶ãï¼==
@@ -202,5 +202,5 @@
  *		assert(data == 0x01)
  *	33:	act_tsk(TASK2)
- *		sta_alm(ALM7, ALM_RELTIM)
+ *		sta_alm(ALM7, 2 * TEST_TIME_CP) ... TASK1ãå®è¡éå§ããã¾ã§
  *		ref_sem(SEM1, &rsem)
  *		assert(rsem.semcnt == 0U)
@@ -213,5 +213,7 @@
  *	36:	ref_alm(ALM7, &ralm)
  *		assert((ralm.almstat & TALM_STP) != 0U)
- *	37:	sta_alm(ALM8, ALM_RELTIM)
+ *	37:	sta_alm(ALM8, TEST_TIME_CP) ... wai_flgã§å¾
+ã¡ã«å
+¥ãã¾ã§
  *		ref_flg(FLG1, &rflg)
  *		assert(rflg.flgptn == 0x01U)
@@ -222,28 +224,30 @@
  *		ref_alm(ALM8, &ralm)
  *		assert((ralm.almstat & TALM_STP) != 0U)
- *	40:	sta_alm(ALM9, ALM_RELTIM)
- *	41:	ref_dtq(DTQ1, &rdtq)
+ *	40:	sta_alm(ALM9,  TEST_TIME_CP) ... rcv_dtqã§å¾
+ã¡ã«å
+¥ãã¾ã§
+ *		ref_dtq(DTQ1, &rdtq)
  *		assert(rdtq.sdtqcnt == 0U)
  *		ref_alm(ALM9, &ralm)
  *		assert((ralm.almstat & TALM_STA) != 0U)
- *	42:	rcv_dtq(DTQ1, &data)							... (B-7)
- *	43:	assert(data == E_QOVR)
+ *	41:	rcv_dtq(DTQ1, &data)							... (B-7)
+ *	42:	assert(data == E_QOVR)
  *		ref_alm(ALM9, &ralm)
  *		assert((ralm.almstat & TALM_STP) != 0U)
- *	44:	sta_alm(ALM10, ALM_RELTIM)
- *	45:	assert(count_variable == 1)
+ *	43:	sta_alm(ALM10, TEST_TIME_CP) ... ref_almã§åä½ç¢ºèªããã¾ã§
+ *	44:	assert(count_variable == 1)
  *		ref_alm(ALM10, &ralm)
  *		assert((ralm.almstat & TALM_STA) != 0U)
  *		DO(wait_count(1))								... (A-2)
- *	46:	ref_alm(ALM10, &ralm)
- *		assert((ralm.almstat & TALM_STP) != 0U)
- *	47:	sta_alm(ALM11, ALM_RELTIM)
- *	48:	assert(count_variable == 2)
+ *	45:	ref_alm(ALM10, &ralm)
+ *		assert((ralm.almstat & TALM_STP) != 0U)
+ *	46:	sta_alm(ALM11, TEST_TIME_CP) ... ref_almã§åä½ç¢ºèªããã¾ã§
+ *	47:	assert(count_variable == 2)
  *		ref_alm(ALM11, &ralm)
  *		assert((ralm.almstat & TALM_STA) != 0U)
  *		DO(wait_count(2))								... (B-2)
- *	49:	ref_alm(ALM9, &ralm)
- *		assert((ralm.almstat & TALM_STP) != 0U)
- *	50:	END
+ *	48:	ref_alm(ALM9, &ralm)
+ *		assert((ralm.almstat & TALM_STP) != 0U)
+ *	49:	END
  */
 
@@ -281,17 +285,17 @@
 task1(intptr_t exinf)
 {
-	T_RTSK	rtsk;
-	T_RDTQ	rdtq;
-	T_RFLG	rflg;
-	intptr_t	data;
-	FLGPTN	flgptn;
 	ER_UINT	ercd;
 	T_RALM	ralm;
+	T_RTSK	rtsk;
 	T_RSEM	rsem;
+	T_RFLG	rflg;
+	FLGPTN	flgptn;
+	T_RDTQ	rdtq;
+	intptr_t	data;
 
 	test_start(__FILE__);
 
 	check_point(1);
-	ercd = sta_alm(ALM1, ALM_RELTIM);
+	ercd = sta_alm(ALM1, TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
@@ -312,5 +316,5 @@
 
 	check_point(3);
-	ercd = sta_alm(ALM2, ALM_RELTIM);
+	ercd = sta_alm(ALM2, TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -330,5 +334,5 @@
 
 	check_point(7);
-	ercd = sta_alm(ALM3, ALM_RELTIM);
+	ercd = sta_alm(ALM3, TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -348,9 +352,9 @@
 
 	check_point(12);
-	ercd = dly_tsk(1000U);
+	ercd = dly_tsk(TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
 	check_point(14);
-	ercd = sta_alm(ALM3, ALM_RELTIM);
+	ercd = sta_alm(ALM3, TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
@@ -360,5 +364,5 @@
 
 	check_point(15);
-	ercd = sta_alm(ALM4, ALM_RELTIM);
+	ercd = sta_alm(ALM4, TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
@@ -374,5 +378,5 @@
 
 	check_point(16);
-	ercd = dly_tsk(ALM_RELTIM * 2);
+	ercd = dly_tsk(2 * TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
@@ -389,5 +393,5 @@
 
 	check_point(18);
-	ercd = sta_alm(ALM4, ALM_RELTIM);
+	ercd = sta_alm(ALM4, TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -401,5 +405,5 @@
 
 	check_point(22);
-	ercd = sta_alm(ALM5, ALM_RELTIM);
+	ercd = sta_alm(ALM5, 2 * TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -427,5 +431,5 @@
 
 	check_point(26);
-	ercd = sta_alm(ALM6, ALM_RELTIM);
+	ercd = sta_alm(ALM6, TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -441,5 +445,5 @@
 
 	check_point(27);
-	ercd = dly_tsk(ALM_RELTIM * 2);
+	ercd = dly_tsk(2 * TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -456,5 +460,5 @@
 
 	check_point(29);
-	ercd = sta_alm(ALM6, ALM_RELTIM);
+	ercd = sta_alm(ALM6, TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -473,5 +477,5 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = sta_alm(ALM7, ALM_RELTIM);
+	ercd = sta_alm(ALM7, 2 * TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -497,5 +501,5 @@
 
 	check_point(37);
-	ercd = sta_alm(ALM8, ALM_RELTIM);
+	ercd = sta_alm(ALM8, TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -523,25 +527,64 @@
 
 	check_point(40);
-	ercd = sta_alm(ALM9, ALM_RELTIM);
-	check_ercd(ercd, E_OK);
+	ercd = sta_alm(ALM9,  TEST_TIME_CP);
+	check_ercd(ercd, E_OK);
+
+	ercd = ref_dtq(DTQ1, &rdtq);
+	check_ercd(ercd, E_OK);
+
+	check_assert(rdtq.sdtqcnt == 0U);
+
+	ercd = ref_alm(ALM9, &ralm);
+	check_ercd(ercd, E_OK);
+
+	check_assert((ralm.almstat & TALM_STA) != 0U);
 
 	check_point(41);
-	ercd = ref_dtq(DTQ1, &rdtq);
-	check_ercd(ercd, E_OK);
-
-	check_assert(rdtq.sdtqcnt == 0U);
+	ercd = rcv_dtq(DTQ1, &data);
+	check_ercd(ercd, E_OK);
+
+	check_point(42);
+	check_assert(data == E_QOVR);
 
 	ercd = ref_alm(ALM9, &ralm);
 	check_ercd(ercd, E_OK);
 
-	check_assert((ralm.almstat & TALM_STA) != 0U);
-
-	check_point(42);
-	ercd = rcv_dtq(DTQ1, &data);
-	check_ercd(ercd, E_OK);
+	check_assert((ralm.almstat & TALM_STP) != 0U);
 
 	check_point(43);
-	check_assert(data == E_QOVR);
-
+	ercd = sta_alm(ALM10, TEST_TIME_CP);
+	check_ercd(ercd, E_OK);
+
+	check_point(44);
+	check_assert(count_variable == 1);
+
+	ercd = ref_alm(ALM10, &ralm);
+	check_ercd(ercd, E_OK);
+
+	check_assert((ralm.almstat & TALM_STA) != 0U);
+
+	wait_count(1);
+
+	check_point(45);
+	ercd = ref_alm(ALM10, &ralm);
+	check_ercd(ercd, E_OK);
+
+	check_assert((ralm.almstat & TALM_STP) != 0U);
+
+	check_point(46);
+	ercd = sta_alm(ALM11, TEST_TIME_CP);
+	check_ercd(ercd, E_OK);
+
+	check_point(47);
+	check_assert(count_variable == 2);
+
+	ercd = ref_alm(ALM11, &ralm);
+	check_ercd(ercd, E_OK);
+
+	check_assert((ralm.almstat & TALM_STA) != 0U);
+
+	wait_count(2);
+
+	check_point(48);
 	ercd = ref_alm(ALM9, &ralm);
 	check_ercd(ercd, E_OK);
@@ -549,45 +592,5 @@
 	check_assert((ralm.almstat & TALM_STP) != 0U);
 
-	check_point(44);
-	ercd = sta_alm(ALM10, ALM_RELTIM);
-	check_ercd(ercd, E_OK);
-
-	check_point(45);
-	check_assert(count_variable == 1);
-
-	ercd = ref_alm(ALM10, &ralm);
-	check_ercd(ercd, E_OK);
-
-	check_assert((ralm.almstat & TALM_STA) != 0U);
-
-	wait_count(1);
-
-	check_point(46);
-	ercd = ref_alm(ALM10, &ralm);
-	check_ercd(ercd, E_OK);
-
-	check_assert((ralm.almstat & TALM_STP) != 0U);
-
-	check_point(47);
-	ercd = sta_alm(ALM11, ALM_RELTIM);
-	check_ercd(ercd, E_OK);
-
-	check_point(48);
-	check_assert(count_variable == 2);
-
-	ercd = ref_alm(ALM11, &ralm);
-	check_ercd(ercd, E_OK);
-
-	check_assert((ralm.almstat & TALM_STA) != 0U);
-
-	wait_count(2);
-
-	check_point(49);
-	ercd = ref_alm(ALM9, &ralm);
-	check_ercd(ercd, E_OK);
-
-	check_assert((ralm.almstat & TALM_STP) != 0U);
-
-	check_finish(50);
+	check_finish(49);
 	check_point(0);
 }
