Index: asp3_wo_tecs/trunk/extension/MANIFEST
===================================================================
--- asp3_wo_tecs/trunk/extension/MANIFEST	(revision 302)
+++ asp3_wo_tecs/trunk/extension/MANIFEST	(revision 306)
@@ -23,15 +23,15 @@
 messagebuf/kernel/allfunc.h
 messagebuf/kernel/check.h
-messagebuf/kernel/kernel.tf
-messagebuf/kernel/kernel_api.csv
-messagebuf/kernel/kernel_def.csv
+messagebuf/kernel/kernel.trb
+messagebuf/kernel/kernel_api.def
 messagebuf/kernel/kernel_impl.h
 messagebuf/kernel/kernel_int.h
 messagebuf/kernel/kernel_rename.def
 messagebuf/kernel/kernel_rename.h
+messagebuf/kernel/kernel_sym.def
 messagebuf/kernel/kernel_unrename.h
 messagebuf/kernel/messagebuf.c
 messagebuf/kernel/messagebuf.h
-messagebuf/kernel/messagebuf.tf
+messagebuf/kernel/messagebuf.trb
 messagebuf/kernel/task.h
 messagebuf/kernel/task_refer.c
@@ -55,15 +55,15 @@
 ovrhdr/kernel/check.h
 ovrhdr/kernel/interrupt.c
-ovrhdr/kernel/kernel.tf
-ovrhdr/kernel/kernel_api.csv
-ovrhdr/kernel/kernel_check.tf
-ovrhdr/kernel/kernel_def.csv
+ovrhdr/kernel/kernel.trb
+ovrhdr/kernel/kernel_api.def
+ovrhdr/kernel/kernel_check.trb
 ovrhdr/kernel/kernel_int.h
 ovrhdr/kernel/kernel_rename.def
 ovrhdr/kernel/kernel_rename.h
+ovrhdr/kernel/kernel_sym.def
 ovrhdr/kernel/kernel_unrename.h
 ovrhdr/kernel/overrun.c
 ovrhdr/kernel/overrun.h
-ovrhdr/kernel/overrun.tf
+ovrhdr/kernel/overrun.trb
 ovrhdr/kernel/sys_manage.c
 ovrhdr/kernel/task.c
@@ -90,7 +90,7 @@
 
 rstr_task/kernel/check.h
-rstr_task/kernel/kernel_def.csv
+rstr_task/kernel/kernel_sym.def
 rstr_task/kernel/sys_manage.c
-rstr_task/kernel/task.tf
+rstr_task/kernel/task.trb
 rstr_task/kernel/task_manage.c
 rstr_task/kernel/task_sync.c
@@ -107,13 +107,13 @@
 subprio/kernel/Makefile.kernel
 subprio/kernel/allfunc.h
-subprio/kernel/kernel_api.csv
+subprio/kernel/kernel_api.def
 subprio/kernel/kernel_rename.def
 subprio/kernel/kernel_rename.h
 subprio/kernel/kernel_unrename.h
-subprio/kernel/mutex.tf
+subprio/kernel/mutex.trb
 subprio/kernel/sys_manage.c
 subprio/kernel/task.c
 subprio/kernel/task.h
-subprio/kernel/task.tf
+subprio/kernel/task.trb
 subprio/kernel/task_manage.c
 subprio/kernel/task_refer.c
@@ -131,43 +131,37 @@
 dcre/kernel/alarm.c
 dcre/kernel/alarm.h
-dcre/kernel/alarm.tf
+dcre/kernel/alarm.trb
 dcre/kernel/allfunc.h
 dcre/kernel/check.h
 dcre/kernel/cyclic.c
 dcre/kernel/cyclic.h
-dcre/kernel/cyclic.tf
+dcre/kernel/cyclic.trb
 dcre/kernel/dataqueue.c
 dcre/kernel/dataqueue.h
-dcre/kernel/dataqueue.tf
 dcre/kernel/eventflag.c
 dcre/kernel/eventflag.h
-dcre/kernel/eventflag.tf
 dcre/kernel/interrupt.c
 dcre/kernel/interrupt.h
-dcre/kernel/interrupt.tf
-dcre/kernel/kernel.tf
-dcre/kernel/kernel_api.csv
-dcre/kernel/kernel_check.tf
-dcre/kernel/kernel_def.csv
+dcre/kernel/interrupt.trb
+dcre/kernel/kernel.trb
+dcre/kernel/kernel_api.def
+dcre/kernel/kernel_check.trb
 dcre/kernel/kernel_impl.h
 dcre/kernel/kernel_rename.def
 dcre/kernel/kernel_rename.h
+dcre/kernel/kernel_sym.def
 dcre/kernel/kernel_unrename.h
 dcre/kernel/mempfix.c
 dcre/kernel/mempfix.h
-dcre/kernel/mempfix.tf
 dcre/kernel/mutex.c
 dcre/kernel/mutex.h
-dcre/kernel/mutex.tf
 dcre/kernel/pridataq.c
 dcre/kernel/pridataq.h
-dcre/kernel/pridataq.tf
 dcre/kernel/semaphore.c
 dcre/kernel/semaphore.h
-dcre/kernel/semaphore.tf
 dcre/kernel/startup.c
 dcre/kernel/task.c
 dcre/kernel/task.h
-dcre/kernel/task.tf
+dcre/kernel/task.trb
 dcre/kernel/task_manage.c
 dcre/kernel/task_refer.c
Index: asp3_wo_tecs/trunk/extension/dcre/include/kernel.h
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/include/kernel.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/dcre/include/kernel.h	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: kernel.h 463 2015-10-18 14:25:55Z ertl-hiro $
+ *  $Id: kernel.h 654 2016-02-20 12:59:31Z ertl-hiro $
  */
 
@@ -723,6 +723,6 @@
 #define TKERNEL_MAKER	UINT_C(0x0118)	/* ã«ã¼ãã«ã®ã¡ã¼ã«ã¼ã³ã¼ã */
 #define TKERNEL_PRID	UINT_C(0x0007)	/* ã«ã¼ãã«ã®è­å¥çªå· */
-#define TKERNEL_SPVER	UINT_C(0xf630)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
-#define TKERNEL_PRVER	UINT_C(0x30b0)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_SPVER	UINT_C(0xf631)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_PRVER	UINT_C(0x3010)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
 
 /*
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/Makefile.kernel
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/Makefile.kernel	(revision 302)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/Makefile.kernel	(revision 306)
@@ -6,5 +6,5 @@
 #  Copyright (C) 2003 by Embedded and Real-Time Systems Laboratory
 #                              Toyohashi Univ. of Technology, JAPAN
-#  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+#  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
 #              Graduate School of Information Science, Nagoya Univ., JAPAN
 # 
@@ -53,5 +53,5 @@
 #  ã®è²¬ä»»ãè² ããªãï¼
 # 
-#  $Id: Makefile.kernel 333 2015-06-21 13:23:37Z ertl-hiro $
+#  $Id: Makefile.kernel 554 2016-01-17 13:21:59Z ertl-hiro $
 # 
 
@@ -135,23 +135,23 @@
 #  çæããããªãã¸ã§ã¯ããã¡ã¤ã«ã®ä¾å­é¢ä¿ã®å®ç¾©
 #
-$(startup) $(startup:.o=.s) $(startup:.o=.d): startup.c
-$(task) $(task:.o=.s) $(task:.o=.d): task.c
-$(taskhook) $(taskhook:.o=.s) $(taskhook:.o=.d): taskhook.c
-$(wait) $(wait:.o=.s) $(wait:.o=.d): wait.c
-$(time_event) $(time_event:.o=.s) $(time_event:.o=.d): time_event.c
-$(task_manage) $(task_manage:.o=.s) $(task_manage:.o=.d): task_manage.c
-$(task_refer) $(task_refer:.o=.s) $(task_refer:.o=.d): task_refer.c
-$(task_sync) $(task_sync:.o=.s) $(task_sync:.o=.d): task_sync.c
-$(task_term) $(task_term:.o=.s) $(task_term:.o=.d): task_term.c
-$(semaphore) $(semaphore:.o=.s) $(semaphore:.o=.d): semaphore.c
-$(eventflag) $(eventflag:.o=.s) $(eventflag:.o=.d): eventflag.c
-$(dataqueue) $(dataqueue:.o=.s) $(dataqueue:.o=.d): dataqueue.c
-$(pridataq) $(pridataq:.o=.s) $(pridataq:.o=.d): pridataq.c
-$(mutex) $(mutex:.o=.s) $(mutex:.o=.d): mutex.c
-$(mempfix) $(mempfix:.o=.s) $(mempfix:.o=.d): mempfix.c
-$(time_manage) $(time_manage:.o=.s) $(time_manage:.o=.d): time_manage.c
-$(cyclic) $(cyclic:.o=.s) $(cyclic:.o=.d): cyclic.c
-$(alarm) $(alarm:.o=.s) $(alarm:.o=.d): alarm.c
-$(sys_manage) $(sys_manage:.o=.s) $(sys_manage:.o=.d): sys_manage.c
-$(interrupt) $(interrupt:.o=.s) $(interrupt:.o=.d): interrupt.c
-$(exception) $(exception:.o=.s) $(exception:.o=.d): exception.c
+$(startup) $(startup:.o=.s): startup.c
+$(task) $(task:.o=.s): task.c
+$(taskhook) $(taskhook:.o=.s): taskhook.c
+$(wait) $(wait:.o=.s): wait.c
+$(time_event) $(time_event:.o=.s): time_event.c
+$(task_manage) $(task_manage:.o=.s): task_manage.c
+$(task_refer) $(task_refer:.o=.s): task_refer.c
+$(task_sync) $(task_sync:.o=.s): task_sync.c
+$(task_term) $(task_term:.o=.s): task_term.c
+$(semaphore) $(semaphore:.o=.s): semaphore.c
+$(eventflag) $(eventflag:.o=.s): eventflag.c
+$(dataqueue) $(dataqueue:.o=.s): dataqueue.c
+$(pridataq) $(pridataq:.o=.s): pridataq.c
+$(mutex) $(mutex:.o=.s): mutex.c
+$(mempfix) $(mempfix:.o=.s): mempfix.c
+$(time_manage) $(time_manage:.o=.s): time_manage.c
+$(cyclic) $(cyclic:.o=.s): cyclic.c
+$(alarm) $(alarm:.o=.s): alarm.c
+$(sys_manage) $(sys_manage:.o=.s): sys_manage.c
+$(interrupt) $(interrupt:.o=.s): interrupt.c
+$(exception) $(exception:.o=.s): exception.c
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/alarm.c
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/alarm.c	(revision 302)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/alarm.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: alarm.c 451 2015-08-14 15:29:07Z ertl-hiro $
+ *  $Id: alarm.c 717 2016-03-31 07:03:53Z ertl-hiro $
  */
 
@@ -179,11 +179,16 @@
 	ALMCB		*p_almcb;
 	ALMINIB		*p_alminib;
-	T_NFYINFO	*p_nfyinfo;
+	ATR			almatr;
+	T_NFYINFO	nfyinfo, *p_nfyinfo;
 	ER			ercd, rercd;
 
 	LOG_ACRE_ALM_ENTER(pk_calm);
 	CHECK_TSKCTX_UNL();
-	CHECK_RSATR(pk_calm->almatr, TA_NULL);
-	rercd = check_nfyinfo(&(pk_calm->nfyinfo));
+
+	almatr = pk_calm->almatr;
+	nfyinfo = pk_calm->nfyinfo;
+
+	CHECK_RSATR(almatr, TA_NULL);
+	rercd = check_nfyinfo(&nfyinfo);
 	if (rercd != E_OK) {
 		ercd = rercd;
@@ -199,12 +204,12 @@
 												- offsetof(ALMCB, tmevtb)));
 		p_alminib = (ALMINIB *)(p_almcb->p_alminib);
-		p_alminib->almatr = pk_calm->almatr;
-		if (pk_calm->nfyinfo.nfymode == TNFY_HANDLER) {
-			p_alminib->exinf = pk_calm->nfyinfo.nfy.handler.exinf;
-			p_alminib->nfyhdr = (NFYHDR)(pk_calm->nfyinfo.nfy.handler.tmehdr);
+		p_alminib->almatr = almatr;
+		if (nfyinfo.nfymode == TNFY_HANDLER) {
+			p_alminib->exinf = nfyinfo.nfy.handler.exinf;
+			p_alminib->nfyhdr = (NFYHDR)(nfyinfo.nfy.handler.tmehdr);
 		}
 		else {
 			p_nfyinfo = &aalm_nfyinfo_table[p_alminib - aalminib_table];
-			*p_nfyinfo = pk_calm->nfyinfo;
+			*p_nfyinfo = nfyinfo;
 			p_alminib->exinf = (intptr_t) p_nfyinfo;
 			p_alminib->nfyhdr = notify_handler;
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/alarm.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/alarm.tf	(revision 302)
+++ 	(revision )
@@ -1,174 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2015 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: alarm.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		ã¢ã©ã¼ã éç¥æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  AID_ALMã®å¦ç
-$
-$num_aalmid = 0$
-$FOREACH i AALM.ORDER_LIST$
-$	// noalmãè² ã®å ´åï¼E_PARï¼
-	$IF AALM.NOALM[i] < 0$
-		$ERROR AALM.TEXT_LINE[i]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-									"noalm", AALM.NOALM[i], "AID_ALM")$
-		$END$
-	$END$
-	$num_aalmid = num_aalmid + AALM.NOALM[i]$
-$END$
-$num_almid = LENGTH(ALM.ID_LIST) + num_aalmid$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_ALMID	$num_almid$$NL$
-$FOREACH id ALM.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Alarm Handler Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  ã¢ã©ã¼ã éç¥ã®IDçªå·ãä¿æããå¤æ°
-$
-$IF USE_EXTERNAL_ID$
-	$FOREACH id ALM.ID_LIST$
-		const ID $id$_id = $+id$;$NL$
-	$END$
-$END$
-
-$
-$  éçã«çæãããã¢ã©ã¼ã éç¥ã®æ°
-$
-#define TNUM_SALMID	$LENGTH(ALM.ID_LIST)$$NL$
-$NL$
-
-$
-$  ã¢ã©ã¼ã éç¥IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_almid = (TMIN_ALMID + TNUM_ALMID - 1);$NL$
-const ID _kernel_tmax_salmid = (TMIN_ALMID + TNUM_SALMID - 1);$NL$
-$NL$
-
-$
-$  ã¢ã©ã¼ã éç¥åæåãã­ãã¯
-$
-$IF LENGTH(ALM.ID_LIST)$
-	$FOREACH almid ALM.ID_LIST$
-$		// almatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2491ï¼½
-$		//ï¼TA_STAä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-		$IF ALM.ALMATR[almid] != 0$
-			$ERROR ALM.TEXT_LINE[almid]$E_RSATR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"almatr", ALM.ALMATR[almid], almid, "CRE_ALM")$
-			$END$
-		$END$
-
-$		// éç¥æ
-å ±ã®å¦ç
-		$ALM.NFYHDR[almid] = GENERATE_NFYHDR(ALM.NFYMODE[almid],
-								ALM.PAR1[almid], ALM.PAR2[almid],
-								ALM.PAR3[almid], ALM.PAR4[almid],
-								ALM.TEXT_LINE[almid], almid, "CRE_ALM")$
-	$END$
-
-$	// ã¢ã©ã¼ã éç¥åæåãã­ãã¯
-	const ALMINIB _kernel_alminib_table[TNUM_SALMID] = {$NL$
-	$JOINEACH almid ALM.ID_LIST ",\n"$
-		$TAB${$SPC$
-			($ALM.ALMATR[almid]$),$SPC$
-			(intptr_t)($ALM.PAR1[almid]$),$SPC$
-			$ALM.NFYHDR[almid]$$SPC$
-		}$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const ALMINIB, _kernel_alminib_table);$NL$
-$END$$NL$
-
-$
-$  åççæã¢ã©ã¼ã éç¥ç¨ã®ã¢ã©ã¼ã éç¥åæåãã­ãã¯ã¨éç¥æ¹æ³ã®æ ¼ç´
-$  ã¨ãªã¢
-$
-$IF num_aalmid > 0$
-	ALMINIB _kernel_aalminib_table[$num_aalmid$];$NL$
-	T_NFYINFO _kernel_aalm_nfyinfo_table[$num_aalmid$];$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(ALMINIB, _kernel_aalminib_table);$NL$
-	TOPPERS_EMPTY_LABEL(T_NFYINFO, _kernel_aalm_nfyinfo_table);$NL$
-$END$$NL$
-
-$
-$  ã¢ã©ã¼ã éç¥ç®¡çãã­ãã¯ã¨ã¢ã©ã¼ã éç¥æ©è½åæåé¢æ°
-$
-$IF num_almid > 0$
-	ALMCB _kernel_almcb_table[TNUM_ALMID];$NL$
-	$initfuncs = APPEND(initfuncs, "_kernel_initialize_alarm();")$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(ALMCB, _kernel_almcb_table);$NL$
-$END$$NL$
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/alarm.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/alarm.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/alarm.trb	(revision 306)
@@ -0,0 +1,91 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: alarm.trb 588 2016-02-05 12:54:58Z ertl-hiro $
+# 
+
+#
+#		ã¢ã©ã¼ã éç¥æ©è½ã®çæã¹ã¯ãªãã
+#
+
+class AlarmObject < KernelObject
+  def initialize()
+    super("alm", "alarm")
+    @inibList["T_NFYINFO"] = "aalm_nfyinfo_table"
+  end
+
+  def prepare(key, params)
+    # almatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2491ï¼½
+    #ï¼TA_STAä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+    if (params[:almatr] & ~($TA_STA)) != 0
+      error_illegal_id("E_RSATR", params, :almatr, :almid)
+    end
+
+    # éç¥æ
+å ±ã®å¦ç
+    params[:nfyhdr] = generateNotifyHandler(key, params, :almid)
+  end
+
+  def generateInib(key, params)
+    return("(#{params[:almatr]}), (intptr_t)(#{params[:par1]}), " \
+												"#{params[:nfyhdr]}")
+  end
+end
+
+#
+#  ã¢ã©ã¼ã éç¥ã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Alarm Notification Functions")
+AlarmObject.new.generate()
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/check.h
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/check.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/check.h	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: check.h 356 2015-07-25 10:44:32Z ertl-hiro $
+ *  $Id: check.h 580 2016-02-03 11:03:59Z ertl-hiro $
  */
 
@@ -237,5 +237,5 @@
 
 /*
- *  äºç´å±æ§ã¨ã©ã¼ã®ãã§ãã¯ï¼E_PARï¼
+ *  äºç´å±æ§ã¨ã©ã¼ã®ãã§ãã¯ï¼E_RSATRï¼
  */
 #define CHECK_RSATR(atr, valid_atr) do {					\
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/cyclic.c
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/cyclic.c	(revision 302)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/cyclic.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: cyclic.c 451 2015-08-14 15:29:07Z ertl-hiro $
+ *  $Id: cyclic.c 717 2016-03-31 07:03:53Z ertl-hiro $
  */
 
@@ -190,17 +190,26 @@
 	CYCCB		*p_cyccb;
 	CYCINIB		*p_cycinib;
-	T_NFYINFO	*p_nfyinfo;
+	ATR			cycatr;
+	T_NFYINFO	nfyinfo, *p_nfyinfo;
+	RELTIM		cyctim;
+	RELTIM		cycphs;
 	ER			ercd, rercd;
 
 	LOG_ACRE_CYC_ENTER(pk_ccyc);
 	CHECK_TSKCTX_UNL();
-	CHECK_RSATR(pk_ccyc->cycatr, TA_STA);
-	rercd = check_nfyinfo(&(pk_ccyc->nfyinfo));
+
+	cycatr = pk_ccyc->cycatr;
+	nfyinfo = pk_ccyc->nfyinfo;
+	cyctim = pk_ccyc->cyctim;
+	cycphs = pk_ccyc->cycphs;
+
+	CHECK_RSATR(cycatr, TA_STA);
+	rercd = check_nfyinfo(&nfyinfo);
 	if (rercd != E_OK) {
 		ercd = rercd;
 		goto error_exit;
 	}
-	CHECK_PAR(0 < pk_ccyc->cyctim && pk_ccyc->cyctim <= TMAX_RELTIM);
-	CHECK_PAR(0 <= pk_ccyc->cycphs && pk_ccyc->cycphs <= TMAX_RELTIM);
+	CHECK_PAR(0 < cyctim && cyctim <= TMAX_RELTIM);
+	CHECK_PAR(0 <= cycphs && cycphs <= TMAX_RELTIM);
 
 	lock_cpu();
@@ -212,17 +221,17 @@
 												- offsetof(CYCCB, tmevtb)));
 		p_cycinib = (CYCINIB *)(p_cyccb->p_cycinib);
-		p_cycinib->cycatr = pk_ccyc->cycatr;
-		if (pk_ccyc->nfyinfo.nfymode == TNFY_HANDLER) {
-			p_cycinib->exinf = pk_ccyc->nfyinfo.nfy.handler.exinf;
-			p_cycinib->nfyhdr = (NFYHDR)(pk_ccyc->nfyinfo.nfy.handler.tmehdr);
+		p_cycinib->cycatr = cycatr;
+		if (nfyinfo.nfymode == TNFY_HANDLER) {
+			p_cycinib->exinf = nfyinfo.nfy.handler.exinf;
+			p_cycinib->nfyhdr = (NFYHDR)(nfyinfo.nfy.handler.tmehdr);
 		}
 		else {
 			p_nfyinfo = &acyc_nfyinfo_table[p_cycinib - acycinib_table];
-			*p_nfyinfo = pk_ccyc->nfyinfo;
+			*p_nfyinfo = nfyinfo;
 			p_cycinib->exinf = (intptr_t) p_nfyinfo;
 			p_cycinib->nfyhdr = notify_handler;
 		}
-		p_cycinib->cyctim = pk_ccyc->cyctim;
-		p_cycinib->cycphs = pk_ccyc->cycphs;
+		p_cycinib->cyctim = cyctim;
+		p_cycinib->cycphs = cycphs;
 
 		if ((p_cyccb->p_cycinib->cycatr & TA_STA) != 0U) {
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/cyclic.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/cyclic.tf	(revision 302)
+++ 	(revision )
@@ -1,191 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2015 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: cyclic.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		å¨æéç¥æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  AID_CYCã®å¦ç
-$
-$num_acycid = 0$
-$FOREACH i ACYC.ORDER_LIST$
-$	// nocycãè² ã®å ´åï¼E_PARï¼
-	$IF ACYC.NOCYC[i] < 0$
-		$ERROR ACYC.TEXT_LINE[i]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-									"nocyc", ACYC.NOCYC[i], "AID_CYC")$
-		$END$
-	$END$
-	$num_acycid = num_acycid + ACYC.NOCYC[i]$
-$END$
-$num_cycid = LENGTH(CYC.ID_LIST) + num_acycid$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_CYCID	$num_cycid$$NL$
-$FOREACH id CYC.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Cyclic Handler Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  å¨æéç¥ã®IDçªå·ãä¿æããå¤æ°
-$
-$IF USE_EXTERNAL_ID$
-	$FOREACH id CYC.ID_LIST$
-		const ID $id$_id = $+id$;$NL$
-	$END$
-$END$
-
-$
-$  éçã«çæãããå¨æéç¥ã®æ°
-$
-#define TNUM_SCYCID	$LENGTH(CYC.ID_LIST)$$NL$
-$NL$
-
-$
-$  å¨æéç¥IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_cycid = (TMIN_CYCID + TNUM_CYCID - 1);$NL$
-const ID _kernel_tmax_scycid = (TMIN_CYCID + TNUM_SCYCID - 1);$NL$
-$NL$
-
-$
-$  å¨æéç¥åæåãã­ãã¯
-$
-$IF LENGTH(CYC.ID_LIST)$
-	$FOREACH cycid CYC.ID_LIST$
-$		// cycatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2383ï¼½
-$		//ï¼TA_STAä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-		$IF (CYC.CYCATR[cycid] & ~TA_STA) != 0$
-			$ERROR CYC.TEXT_LINE[cycid]$E_RSATR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-					"cycatr", CYC.CYCATR[cycid], cycid, "CRE_CYC")$
-			$END$
-		$END$
-
-$		// (0 < cyctim && cyctim <= TMAX_RELTIM)ã§ãªãå ´åï¼E_PARï¼ï¼»NGKI2397ï¼½
-		$IF !(0 < CYC.CYCTIM[cycid] && CYC.CYCTIM[cycid] <= TMAX_RELTIM)$
-			$ERROR CYC.TEXT_LINE[cycid]$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"cyctim", CYC.CYCTIM[cycid], cycid, "CRE_CYC")$
-			$END$
-		$END$
-
-$		// (0 <= cycphs && cycphs <= TMAX_RELTIM)ã§ãªãå ´åï¼E_PARï¼ï¼»NGKI2399ï¼½
-		$IF !(0 <= CYC.CYCPHS[cycid] && CYC.CYCPHS[cycid] <= TMAX_RELTIM)$
-			$ERROR CYC.TEXT_LINE[cycid]$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"cycphs", CYC.CYCPHS[cycid], cycid, "CRE_CYC")$
-			$END$
-		$END$
-
-$		// éç¥æ
-å ±ã®å¦ç
-		$CYC.NFYHDR[cycid] = GENERATE_NFYHDR(CYC.NFYMODE[cycid],
-								CYC.PAR1[cycid], CYC.PAR2[cycid],
-								CYC.PAR3[cycid], CYC.PAR4[cycid],
-								CYC.TEXT_LINE[cycid], cycid, "CRE_CYC")$
-	$END$
-
-$	// å¨æéç¥åæåãã­ãã¯
-	const CYCINIB _kernel_cycinib_table[TNUM_SCYCID] = {$NL$
-	$JOINEACH cycid CYC.ID_LIST ",\n"$
-		$TAB${$SPC$
-			($CYC.CYCATR[cycid]$),$SPC$
-			(intptr_t)($CYC.PAR1[cycid]$),$SPC$
-			$CYC.NFYHDR[cycid]$,$SPC$
-			($CYC.CYCTIM[cycid]$),$SPC$
-			($CYC.CYCPHS[cycid]$)$SPC$
-		}$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const CYCINIB, _kernel_cycinib_table);$NL$
-$END$$NL$
-
-$
-$  åççæå¨æéç¥ç¨ã®å¨æéç¥åæåãã­ãã¯
-$
-$IF num_acycid > 0$
-	CYCINIB _kernel_acycinib_table[$num_acycid$];$NL$
-	T_NFYINFO _kernel_acyc_nfyinfo_table[$num_acycid$];$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(CYCINIB, _kernel_acycinib_table);$NL$
-	TOPPERS_EMPTY_LABEL(T_NFYINFO, _kernel_acyc_nfyinfo_table);$NL$
-$END$$NL$
-
-$
-$  å¨æéç¥ç®¡çãã­ãã¯ã¨å¨æéç¥æ©è½åæåé¢æ°
-$
-$IF num_cycid > 0$
-	CYCCB _kernel_cyccb_table[TNUM_CYCID];$NL$
-	$initfuncs = APPEND(initfuncs, "_kernel_initialize_cyclic();")$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(CYCCB, _kernel_cyccb_table);$NL$
-$END$$NL$
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/cyclic.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/cyclic.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/cyclic.trb	(revision 306)
@@ -0,0 +1,101 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: cyclic.trb 588 2016-02-05 12:54:58Z ertl-hiro $
+# 
+
+#
+#		å¨æéç¥æ©è½ã®çæã¹ã¯ãªãã
+#
+
+class CyclicObject < KernelObject
+  def initialize()
+    super("cyc", "cyclic")
+    @inibList["T_NFYINFO"] = "acyc_nfyinfo_table"
+  end
+
+  def prepare(key, params)
+    # cycatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2383ï¼½
+    #ï¼TA_STAä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+    if (params[:cycatr] & ~($TA_STA)) != 0
+      error_illegal_id("E_RSATR", params, :cycatr, :cycid)
+    end
+
+    # (0 < cyctim && cyctim <= TMAX_RELTIM)ã§ãªãå ´åï¼E_PARï¼ï¼»NGKI2397ï¼½
+    if !(0 < params[:cyctim] && params[:cyctim] <= $TMAX_RELTIM)
+      error_illegal_id("E_PAR", params, :cyctim, :cycid)
+    end
+
+    # (0 <= cycphs && cycphs <= TMAX_RELTIM)ã§ãªãå ´åï¼E_PARï¼ï¼»NGKI2399ï¼½
+    if !(0 <= params[:cycphs] && params[:cycphs] <= $TMAX_RELTIM)
+      error_illegal_id("E_PAR", params, :cycphs, :cycid)
+    end
+
+    # éç¥æ
+å ±ã®å¦ç
+    params[:nfyhdr] = generateNotifyHandler(key, params, :cycid)
+  end
+
+  def generateInib(key, params)
+    return("(#{params[:cycatr]}), (intptr_t)(#{params[:par1]}), " \
+			"#{params[:nfyhdr]}, (#{params[:cyctim]}), (#{params[:cycphs]})")
+  end
+end
+
+#
+#  å¨æéç¥ã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Cyclic Notification Functions")
+CyclicObject.new.generate()
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/dataqueue.c
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/dataqueue.c	(revision 302)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/dataqueue.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: dataqueue.c 471 2015-12-30 10:03:16Z ertl-hiro $
+ *  $Id: dataqueue.c 717 2016-03-31 07:03:53Z ertl-hiro $
  */
 
@@ -360,4 +360,5 @@
 	DTQINIB		*p_dtqinib;
 	ATR			dtqatr;
+	uint_t		dtqcnt;
 	DTQMB		*p_dtqmb;
 	ER			ercd;
@@ -365,7 +366,10 @@
 	LOG_ACRE_DTQ_ENTER(pk_cdtq);
 	CHECK_TSKCTX_UNL();
-	CHECK_RSATR(pk_cdtq->dtqatr, TA_TPRI);
+
 	dtqatr = pk_cdtq->dtqatr;
+	dtqcnt = pk_cdtq->dtqcnt;
 	p_dtqmb = pk_cdtq->dtqmb;
+
+	CHECK_RSATR(dtqatr, TA_TPRI);
 
 	lock_cpu();
@@ -374,9 +378,9 @@
 	}
 	else {
-		if (pk_cdtq->dtqcnt != 0 && p_dtqmb == NULL) {
-			p_dtqmb = kernel_malloc(sizeof(DTQMB) * pk_cdtq->dtqcnt);
+		if (dtqcnt != 0 && p_dtqmb == NULL) {
+			p_dtqmb = kernel_malloc(sizeof(DTQMB) * dtqcnt);
 			dtqatr |= TA_MBALLOC;
 		}
-		if (pk_cdtq->dtqcnt != 0 && p_dtqmb == NULL) {
+		if (dtqcnt != 0 && p_dtqmb == NULL) {
 			ercd = E_NOMEM;
 		}
@@ -385,5 +389,5 @@
 			p_dtqinib = (DTQINIB *)(p_dtqcb->p_dtqinib);
 			p_dtqinib->dtqatr = dtqatr;
-			p_dtqinib->dtqcnt = pk_cdtq->dtqcnt;
+			p_dtqinib->dtqcnt = dtqcnt;
 			p_dtqinib->p_dtqmb = p_dtqmb;
 
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/dataqueue.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/dataqueue.tf	(revision 302)
+++ 	(revision )
@@ -1,189 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: dataqueue.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		ãã¼ã¿ã­ã¥ã¼æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  AID_DTQã®å¦ç
-$
-$num_adtqid = 0$
-$FOREACH i ADTQ.ORDER_LIST$
-$	// nodtqãè² ã®å ´åï¼E_PARï¼
-	$IF ADTQ.NODTQ[i] < 0$
-		$ERROR ADTQ.TEXT_LINE[i]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-									"nodtq", ADTQ.NODTQ[i], "AID_DTQ")$
-		$END$
-	$END$
-	$num_adtqid = num_adtqid + ADTQ.NODTQ[i]$
-$END$
-$num_dtqid = LENGTH(DTQ.ID_LIST) + num_adtqid$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_DTQID	$num_dtqid$$NL$
-$FOREACH id DTQ.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Dataqueue Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  ãã¼ã¿ã­ã¥ã¼ã®IDçªå·ãä¿æããå¤æ°
-$
-$IF USE_EXTERNAL_ID$
-	$FOREACH id DTQ.ID_LIST$
-		const ID $id$_id = $+id$;$NL$
-	$END$
-$END$
-
-$
-$  éçã«çæããããã¼ã¿ã­ã¥ã¼ã®æ°
-$
-#define TNUM_SDTQID	$LENGTH(DTQ.ID_LIST)$$NL$
-$NL$
-
-$
-$  ãã¼ã¿ã­ã¥ã¼IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_dtqid = (TMIN_DTQID + TNUM_DTQID - 1);$NL$
-const ID _kernel_tmax_sdtqid = (TMIN_DTQID + TNUM_SDTQID - 1);$NL$
-$NL$
-
-$
-$  ãã¼ã¿ã­ã¥ã¼åæåãã­ãã¯
-$
-$IF LENGTH(DTQ.ID_LIST)$
-	$FOREACH dtqid DTQ.ID_LIST$
-$		// dtqatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1669ï¼½
-$		//ï¼TA_TPRIä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-		$IF (DTQ.DTQATR[dtqid] & ~TA_TPRI) != 0$
-			$ERROR DTQ.TEXT_LINE[dtqid]$E_RSATR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"dtqatr", DTQ.DTQATR[dtqid], dtqid, "CRE_DTQ")$
-			$END$
-		$END$
-
-$		// dtqcntãè² ã®å ´åï¼E_PARï¼ï¼»NGKI3288ï¼½
-		$IF DTQ.DTQCNT[dtqid] < 0$
-			$ERROR DTQ.TEXT_LINE[dtqid]$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"dtqcnt", DTQ.DTQCNT[dtqid], dtqid, "CRE_DTQ")$
-			$END$
-		$END$
-
-$		// dtqmbãNULLã§ãªãå ´åï¼E_NOSPTï¼ï¼»ASPS0132ï¼½
-		$IF !EQ(DTQ.DTQMB[dtqid], "NULL")$
-			$ERROR DTQ.TEXT_LINE[dtqid]$E_NOSPT:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"dtqmb", DTQ.DTQMB[dtqid], dtqid, "CRE_DTQ")$
-			$END$
-		$END$
-
-$		// ãã¼ã¿ã­ã¥ã¼ç®¡çé å
-		$IF DTQ.DTQCNT[dtqid]$
-			static DTQMB _kernel_dtqmb_$dtqid$[$DTQ.DTQCNT[dtqid]$];$NL$
-		$END$
-	$END$
-
-$	// ãã¼ã¿ã­ã¥ã¼åæåãã­ãã¯
-	const DTQINIB _kernel_dtqinib_table[TNUM_SDTQID] = {$NL$
-	$JOINEACH dtqid DTQ.ID_LIST ",\n"$
-		$TAB${$SPC$
-			($DTQ.DTQATR[dtqid]$),$SPC$
-			($DTQ.DTQCNT[dtqid]$),$SPC$
-			$IF DTQ.DTQCNT[dtqid]$
-				_kernel_dtqmb_$dtqid$
-			$ELSE$
-				NULL
-			$END$$SPC$
-		}$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const DTQINIB, _kernel_dtqinib_table);$NL$
-$END$$NL$
-
-$
-$  åççæãã¼ã¿ã­ã¥ã¼ç¨ã®ãã¼ã¿ã­ã¥ã¼åæåãã­ãã¯ã®çæ
-$
-$IF num_adtqid > 0$
-	DTQINIB _kernel_adtqinib_table[$num_adtqid$];$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(DTQINIB, _kernel_adtqinib_table);$NL$
-$END$$NL$
-
-$
-$  ãã¼ã¿ã­ã¥ã¼ç®¡çãã­ãã¯ã¨ãã¼ã¿ã­ã¥ã¼æ©è½åæåé¢æ°
-$
-$IF num_dtqid > 0$
-	DTQCB _kernel_dtqcb_table[TNUM_DTQID];$NL$
-	$initfuncs = APPEND(initfuncs, "_kernel_initialize_dataqueue();")$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(DTQCB, _kernel_dtqcb_table);$NL$
-$END$$NL$
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/eventflag.c
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/eventflag.c	(revision 302)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/eventflag.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: eventflag.c 471 2015-12-30 10:03:16Z ertl-hiro $
+ *  $Id: eventflag.c 717 2016-03-31 07:03:53Z ertl-hiro $
  */
 
@@ -212,4 +212,10 @@
 /*
  *  ã¤ãã³ããã©ã°ã®çæ
+ *
+ *  pk_cflg->iflgptnã¯ï¼ã¨ã©ã¼ãã§ãã¯ãããï¼ä¸åº¦ããåç
+§ããªãããï¼
+ *  ã­ã¼ã«ã«å¤æ°ã«ã³ãã¼ããå¿
+è¦ããªãï¼éä¸­ã§æ¸ãæãã£ã¦ãæ¯éããª
+ *  ãï¼ï¼
  */
 #ifdef TOPPERS_acre_flg
@@ -220,9 +226,13 @@
 	FLGCB	*p_flgcb;
 	FLGINIB	*p_flginib;
+	ATR		flgatr;
 	ER		ercd;
 
 	LOG_ACRE_FLG_ENTER(pk_cflg);
 	CHECK_TSKCTX_UNL();
-	CHECK_RSATR(pk_cflg->flgatr, TA_TPRI|TA_WMUL|TA_CLR);
+
+	flgatr = pk_cflg->flgatr;
+
+	CHECK_RSATR(flgatr, TA_TPRI|TA_WMUL|TA_CLR);
 
 	lock_cpu();
@@ -233,5 +243,5 @@
 		p_flgcb = ((FLGCB *) queue_delete_next(&free_flgcb));
 		p_flginib = (FLGINIB *)(p_flgcb->p_flginib);
-		p_flginib->flgatr = pk_cflg->flgatr;
+		p_flginib->flgatr = flgatr;
 		p_flginib->iflgptn = pk_cflg->iflgptn;
 
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/eventflag.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/eventflag.tf	(revision 302)
+++ 	(revision )
@@ -1,171 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: eventflag.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		ã¤ãã³ããã©ã°æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  AID_FLGã®å¦ç
-$
-$num_aflgid = 0$
-$FOREACH i AFLG.ORDER_LIST$
-$	// noflgãè² ã®å ´åï¼E_PARï¼
-	$IF AFLG.NOFLG[i] < 0$
-		$ERROR AFLG.TEXT_LINE[i]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-									"noflg", AFLG.NOFLG[i], "AID_FLG")$
-		$END$
-	$END$
-	$num_aflgid = num_aflgid + AFLG.NOFLG[i]$
-$END$
-$num_flgid = LENGTH(FLG.ID_LIST) + num_aflgid$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_FLGID	$num_flgid$$NL$
-$FOREACH id FLG.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Eventflag Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  ã¤ãã³ããã©ã°ã®IDçªå·ãä¿æããå¤æ°
-$
-$IF USE_EXTERNAL_ID$
-	$FOREACH id FLG.ID_LIST$
-		const ID $id$_id = $+id$;$NL$
-	$END$
-$END$
-
-$
-$  éçã«çæãããã¤ãã³ããã©ã°ã®æ°
-$
-#define TNUM_SFLGID	$LENGTH(FLG.ID_LIST)$$NL$
-$NL$
-
-$
-$  ã¤ãã³ããã©ã°IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_flgid = (TMIN_FLGID + TNUM_FLGID - 1);$NL$
-const ID _kernel_tmax_sflgid = (TMIN_FLGID + TNUM_SFLGID - 1);$NL$
-$NL$
-
-$
-$  ã¤ãã³ããã©ã°åæåãã­ãã¯
-$
-$IF LENGTH(FLG.ID_LIST)$
-	$FOREACH flgid FLG.ID_LIST$
-$		// flgatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1562ï¼½
-$		//ï¼TA_TPRIï¼TA_WMULï¼TA_CLRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-		$IF (FLG.FLGATR[flgid] & ~(TA_TPRI|TA_WMUL|TA_CLR)) != 0$
-			$ERROR FLG.TEXT_LINE[flgid]$E_RSATR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"flgatr", FLG.FLGATR[flgid], flgid, "CRE_FLG")$
-			$END$
-		$END$
-
-$		// iflgptnãFLGPTNã«æ ¼ç´ã§ããªãå ´åï¼E_PARï¼ï¼»NGKI3275ï¼½
-		$IF (FLG.IFLGPTN[flgid] & ~((1 << TBIT_FLGPTN) - 1)) != 0$
-			$ERROR FLG.TEXT_LINE[flgid]$E_PAR:$SPC$
-				$FORMAT(_("too large %1% `%2%\' of `%3%\' in %4%"),
-							"iflgptn", FLG.IFLGPTN[flgid], flgid, "CRE_FLG")$
-			$END$
-		$END$
-	$END$
-
-$	// ã¤ãã³ããã©ã°åæåãã­ãã¯
-	const FLGINIB _kernel_flginib_table[TNUM_SFLGID] = {$NL$
-	$JOINEACH flgid FLG.ID_LIST ",\n"$
-		$TAB${$SPC$
-			($FLG.FLGATR[flgid]$),$SPC$
-			($FLG.IFLGPTN[flgid]$)$SPC$
-		}$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const FLGINIB, _kernel_flginib_table);$NL$
-$END$$NL$
-
-$
-$  åççæã¤ãã³ããã©ã°ç¨ã®ã¤ãã³ããã©ã°åæåãã­ãã¯
-$
-$IF num_aflgid > 0$
-	FLGINIB _kernel_aflginib_table[$num_aflgid$];$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(FLGINIB, _kernel_aflginib_table);$NL$
-$END$$NL$
-
-$
-$  ã¤ãã³ããã©ã°ç®¡çãã­ãã¯ã¨ã¤ãã³ããã©ã°æ©è½åæåé¢æ°
-$
-$IF num_flgid > 0$
-	FLGCB _kernel_flgcb_table[TNUM_FLGID];$NL$
-	$initfuncs = APPEND(initfuncs, "_kernel_initialize_eventflag();")$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(FLGCB, _kernel_flgcb_table);$NL$
-$END$$NL$
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/interrupt.c
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/interrupt.c	(revision 302)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/interrupt.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: interrupt.c 275 2014-11-03 14:26:05Z ertl-hiro $
+ *  $Id: interrupt.c 717 2016-03-31 07:03:53Z ertl-hiro $
  */
 
@@ -176,6 +176,7 @@
 	}
 	for (i = 0; i < tnum_sisr; i++) {
-		p_isrcb = &(isrcb_table[i]);
-		p_isrcb->p_isrinib = &(isrinib_table[i]);
+		j = INDEX_ISR(isrorder_table[i]);
+		p_isrcb = &(isrcb_table[j]);
+		p_isrcb->p_isrinib = &(isrinib_table[j]);
 		enqueue_isr(p_isrcb->p_isrinib->p_isr_queue, p_isrcb);
 	}
@@ -255,4 +256,9 @@
 /*
  *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã®çæ
+ *
+ *  pk_cisr->exinfã¯ï¼ã¨ã©ã¼ãã§ãã¯ãããï¼ä¸åº¦ããåç
+§ããªãããï¼ã­ã¼
+ *  ã«ã«å¤æ°ã«ã³ãã¼ããå¿
+è¦ããªãï¼éä¸­ã§æ¸ãæãã£ã¦ãæ¯éããªãï¼ï¼
  */
 #ifdef TOPPERS_acre_isr
@@ -261,18 +267,28 @@
 acre_isr(const T_CISR *pk_cisr)
 {
-	ISRCB	*p_isrcb;
-	ISRINIB	*p_isrinib;
-	QUEUE	*p_isr_queue;
-	ER		ercd;
+	ISRCB		*p_isrcb;
+	ISRINIB		*p_isrinib;
+	QUEUE		*p_isr_queue;
+	ATR			isratr;
+	INTNO		intno;
+	ISR			isr;
+	PRI			isrpri;
+	ER			ercd;
 
 	LOG_ACRE_ISR_ENTER(pk_cisr);
 	CHECK_TSKCTX_UNL();
-	CHECK_RSATR(pk_cisr->isratr, TARGET_ISRATR);
-	CHECK_PAR(VALID_INTNO_CREISR(pk_cisr->intno));
-	CHECK_PAR(FUNC_ALIGN(pk_cisr->isr));
-	CHECK_PAR(FUNC_NONNULL(pk_cisr->isr));
-	CHECK_PAR(VALID_ISRPRI(pk_cisr->isrpri));
-
-	p_isr_queue = search_isr_queue(pk_cisr->intno);
+
+	isratr = pk_cisr->isratr;
+	intno = pk_cisr->intno;
+	isr = pk_cisr->isr;
+	isrpri = pk_cisr->isrpri;
+
+	CHECK_RSATR(isratr, TARGET_ISRATR);
+	CHECK_PAR(VALID_INTNO_CREISR(intno));
+	CHECK_PAR(FUNC_ALIGN(isr));
+	CHECK_PAR(FUNC_NONNULL(isr));
+	CHECK_PAR(VALID_ISRPRI(isrpri));
+
+	p_isr_queue = search_isr_queue(intno);
 	CHECK_OBJ(p_isr_queue != NULL);
 
@@ -284,9 +300,9 @@
 		p_isrcb = ((ISRCB *) queue_delete_next(&free_isrcb));
 		p_isrinib = (ISRINIB *)(p_isrcb->p_isrinib);
-		p_isrinib->isratr = pk_cisr->isratr;
+		p_isrinib->isratr = isratr;
 		p_isrinib->exinf = pk_cisr->exinf;
 		p_isrinib->p_isr_queue = p_isr_queue;
-		p_isrinib->isr = pk_cisr->isr;
-		p_isrinib->isrpri = pk_cisr->isrpri;
+		p_isrinib->isr = isr;
+		p_isrinib->isrpri = isrpri;
 		enqueue_isr(p_isr_queue, p_isrcb);
 		ercd = ISRID(p_isrcb);
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/interrupt.h
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/interrupt.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/interrupt.h	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: interrupt.h 356 2015-07-25 10:44:32Z ertl-hiro $
+ *  $Id: interrupt.h 613 2016-02-08 04:29:27Z ertl-hiro $
  */
 
@@ -130,4 +130,9 @@
 
 /*
+ *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³çæé åºãã¼ãã«ï¼kernel_cfg.cï¼
+ */
+extern const ID	isrorder_table[];
+
+/*
  *  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ç®¡çãã­ãã¯ã®ã¨ãªã¢ï¼kernel_cfg.cï¼
  */
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/interrupt.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/interrupt.tf	(revision 302)
+++ 	(revision )
@@ -1,556 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2015 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: interrupt.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		å²è¾¼ã¿ç®¡çæ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  AID_ISRã®å¦ç
-$
-$num_aisrid = 0$
-$FOREACH i AISR.ORDER_LIST$
-$	// noisrãè² ã®å ´åï¼E_PARï¼
-	$IF AISR.NOISR[i] < 0$
-		$ERROR AISR.TEXT_LINE[i]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-									"noisr", AISR.NOISR[i], "AID_ISR")$
-		$END$
-	$END$
-	$num_aisrid = num_aisrid + AISR.NOISR[i]$
-$END$
-$num_isrid = LENGTH(ISR.ID_LIST) + num_aisrid$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_ISRID	$num_isrid$$NL$
-$FOREACH id ISR.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Interrupt Management Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  CRE_ISRã§ä½¿ç¨ã§ããå²è¾¼ã¿çªå·ã¨ããã«å¯¾å¿ããå²è¾¼ã¿ãã³ãã©çªå·ã®ããã©
-$  ã«ãå®ç¾©
-$
-$IF !LENGTH(INTNO_CREISR_VALID)$
-	$INTNO_CREISR_VALID = INTNO_VALID$
-$END$
-$IF !LENGTH(INHNO_CREISR_VALID)$
-	$INHNO_CREISR_VALID = INHNO_VALID$
-$END$
-
-$
-$  CFG_INTã§ä½¿ç¨ã§ããå²è¾¼ã¿åªå
-åº¦ã®ããã©ã«ãå®ç¾©
-$ 
-$IF !LENGTH(INTPRI_CFGINT_VALID)$
-	$INTPRI_CFGINT_VALID = RANGE(TMIN_INTPRI, TMAX_INTPRI)$
-$END$
-
-$
-$  å²è¾¼ã¿çªå·ã¨å²è¾¼ã¿ãã³ãã©çªå·ã®å¤æãã¼ãã«ã®ä½æ
-$
-$IF LENGTH(INTNO_CREISR_VALID) != LENGTH(INHNO_CREISR_VALID)$
-	$ERROR$length of `INTNO_CREISR_VALID' is different from length of `INHNO_CREISR_VALID'$END$
-$END$
-$i = 0$
-$FOREACH intno INTNO_CREISR_VALID$
-	$inhno = AT(INHNO_CREISR_VALID, i)$
-	$INHNO[intno] = inhno$
-	$INTNO[inhno] = intno$
-	$i = i + 1$
-$END$
-
-$
-$  å²è¾¼ã¿è¦æ±ã©ã¤ã³ã«é¢ããã¨ã©ã¼ãã§ãã¯
-$
-$ INTNO_LISTï¼å¦çæ¸ã¿ã®å²è¾¼ã¿çªå·ã®ãªã¹ãï¼ããã§ã®ã¿ä½¿ç¨ï¼
-$
-$FOREACH intno INT.ORDER_LIST$
-$	// intnoãå²è¾¼ã¿çªå·ã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼ï¼»NGKI2972ï¼½
-	$IF !LENGTH(FIND(INTNO_VALID, INT.INTNO[intno]))$
-		$ERROR INT.TEXT_LINE[intno]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-						"intno", INT.INTNO[intno], "CFG_INT")$
-		$END$
-	$END$
-
-$	// intnoãCFG_INTã«ãã£ã¦è¨­å®æ¸ã¿ã®å ´åï¼E_OBJï¼ï¼»NGKI2976ï¼½
-	$IF LENGTH(FIND(INTNO_LIST, INT.INTNO[intno]))$
-		$ERROR INT.TEXT_LINE[intno]$E_OBJ:$SPC$
-			$FORMAT(_("%1% `%2%\' in %3% is duplicated"),
-						"intno", INT.INTNO[intno], "CFG_INT")$
-		$END$
-	$END$
-
-$	// intatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2969ï¼½
-$	//ï¼TA_ENAINTï¼TA_EDGEï¼TARGET_INTATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-	$IF (INT.INTATR[intno] & ~(TA_ENAINT|TA_EDGE|TARGET_INTATR)) != 0$
-		$ERROR INT.TEXT_LINE[intno]$E_RSATR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of %3% `%4%\' in %5%"),
-						"intatr", INT.INTATR[intno], "intno",
-						INT.INTNO[intno], "CFG_INT")$
-		$END$
-	$END$
-
-$	// intpriãCFG_INTã«å¯¾ããå²è¾¼ã¿åªå
-åº¦ã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼
-$	// ï¼»NGKI2973ï¼½
-	$IF !LENGTH(FIND(INTPRI_CFGINT_VALID, INT.INTPRI[intno]))$
-		$ERROR INT.TEXT_LINE[intno]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-						"intpri", INT.INTPRI[intno], "CFG_INT")$
-		$END$
-	$END$
-
-$	// ã«ã¼ãã«ç®¡çå¤ã«åºå®ããã¦ããintnoã«å¯¾ãã¦ï¼intpriã«TMIN_INTPRI
-$	// ãããå°ããå¤ãæå®ãããªãã£ãå ´åï¼E_OBJï¼ï¼»NGKI2983ï¼½
-	$IF LENGTH(FIND(INTNO_FIX_NONKERNEL, intno))$
-		$IF INT.INTPRI[intno] >= TMIN_INTPRI$
-			$ERROR INT.TEXT_LINE[intno]$E_OBJ:$SPC$
-				$FORMAT(_("%1% `%2%\' must have higher priority than %3%"),
-							"intno", INT.INTNO[intno], "TMIN_INTPRI")$
-			$END$
-		$END$
-	$END$
-
-$	// ã«ã¼ãã«ç®¡çã«åºå®ããã¦ããintnoã«å¯¾ãã¦ï¼intpriã«TMIN_INTPRI
-$	// ãããå°ããå¤ãæå®ãããå ´åï¼E_OBJï¼ï¼»NGKI2984ï¼½
-	$IF LENGTH(FIND(INTNO_FIX_KERNEL, intno))$
-		$IF INT.INTPRI[intno] < TMIN_INTPRI$
-			$ERROR INT.TEXT_LINE[intno]$E_OBJ:$SPC$
-				$FORMAT(_("%1% `%2%\' must not have higher priority than %3%"),
-							"intno", INT.INTNO[intno], "TMIN_INTPRI")$
-			$END$
-		$END$
-	$END$
-
-	$INTNO_LIST = APPEND(INTNO_LIST, INT.INTNO[intno])$
-$END$
-
-$
-$  å²è¾¼ã¿ãã³ãã©ã«é¢ããã¨ã©ã¼ãã§ãã¯
-$
-$ INHNO_LISTï¼å¦çæ¸ã¿ã®å²è¾¼ã¿ãã³ãã©çªå·ã®ãªã¹ãï¼ããã§ã®ã¿ä½¿ç¨ï¼
-$
-$FOREACH inhno INH.ORDER_LIST$
-$	// inhnoãå²è¾¼ã¿ãã³ãã©çªå·ã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼ï¼»NGKI3055ï¼½
-	$IF !LENGTH(FIND(INHNO_VALID, INH.INHNO[inhno]))$
-		$ERROR INH.TEXT_LINE[inhno]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-						"inhno", INH.INHNO[inhno], "DEF_INH")$
-		$END$
-	$END$
-
-$	// inhnoãDEF_INHã«ãã£ã¦è¨­å®æ¸ã¿ã®å ´åï¼E_OBJï¼ï¼»NGKI3063ï¼½
-	$IF LENGTH(FIND(INHNO_LIST, INH.INHNO[inhno]))$
-		$ERROR INH.TEXT_LINE[inhno]$E_OBJ:$SPC$
-			$FORMAT(_("%1% `%2%\' in %3% is duplicated"),
-						"inhno", INH.INHNO[inhno], "DEF_INH")$
-		$END$
-	$END$
-
-$	// inhatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3052ï¼½
-$	//ï¼TARGET_INHATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-	$IF (INH.INHATR[inhno] & ~TARGET_INHATR) != 0$
-		$ERROR INH.TEXT_LINE[inhno]$E_RSATR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of %3% `%4%\' in %5%"),
-						"inhatr", INH.INHATR[inhno], "inhno",
-						INH.INHNO[inhno], "DEF_INH")$
-		$END$
-	$END$
-
-$	// ã«ã¼ãã«ç®¡çå¤ã«åºå®ããã¦ããinhnoã«å¯¾ãã¦ï¼inhatrã«TA_NONKERNEL
-$	// ãæå®ããã¦ããªãå ´åï¼E_RSATRï¼ï¼»NGKI3067ï¼½
-	$IF LENGTH(FIND(INHNO_FIX_NONKERNEL, inhno))$
-		$IF (INH.INHATR[inhno] & TA_NONKERNEL) == 0$
-			$ERROR INH.TEXT_LINE[inhno]$E_RSATR:$SPC$
-				$FORMAT(_("%1% `%2%\' must be non-kernel interrupt"),
-							"inhno", INH.INHNO[inhno])$
-			$END$
-		$END$
-	$END$
-
-$	// ã«ã¼ãã«ç®¡çã«åºå®ããã¦ããinhnoã«å¯¾ãã¦ï¼inhatrã«TA_NONKERNEL
-$	//ããæå®ããã¦ããå ´åï¼E_RSATRï¼ï¼»NGKI3068ï¼½
-	$IF LENGTH(FIND(INHNO_FIX_KERNEL, inhno))$
-		$IF (INH.INHATR[inhno] & TA_NONKERNEL) != 0$
-			$ERROR INH.TEXT_LINE[inhno]$E_RSATR:$SPC$
-				$FORMAT(_("%1% `%2%\' must not be non-kernel interrupt"),
-							"inhno", INH.INHNO[inhno])$
-			$END$
-		$END$
-	$END$
-
-	$IF LENGTH(INTNO[INH.INHNO[inhno]])$
-		$intno = INTNO[INH.INHNO[inhno]]$
-$		// inhnoã«å¯¾å¿ããintnoã«å¯¾ããCFG_INTããªãå ´åï¼E_OBJï¼ï¼»NGKI3062ï¼½
-		$IF !LENGTH(INT.INTNO[intno])$
-			$ERROR INH.TEXT_LINE[inhno]$E_OBJ:$SPC$
-				$FORMAT(_("%1% `%2%\' corresponding to %3% `%4%\' is not configured with %5%"),
-						"intno", intno, "inhno", INH.INHNO[inhno], "CFG_INT")$
-			$END$
-		$ELSE$
-			$IF (INH.INHATR[inhno] & TA_NONKERNEL) == 0$
-$				// inhatrã«TA_NONKERNELãæå®ããã¦ãããï¼inhnoã«å¯¾å¿
-$				// ããintnoã«å¯¾ãã¦CFG_INTã§è¨­å®ãããå²è¾¼ã¿åªå
-åº¦ã
-$				// TMIN_INTPRIãããå°ããå ´åï¼E_OBJï¼ï¼»NGKI3065ï¼½
-				$IF INT.INTPRI[intno] < TMIN_INTPRI$
-					$ERROR INT.TEXT_LINE[intno]$E_OBJ:$SPC$
-						$FORMAT(_("%1% `%2%\' configured for %3% `%4%\' is higher than %5%"),
-									"intpri", INT.INTPRI[intno], "inhno",
-									INH.INHNO[inhno], "TMIN_INTPRI")$
-					$END$
-				$END$
-			$ELSE$
-$				// inhatrã«TA_NONKERNELãæå®ããã¦ããï¼inhnoã«å¯¾å¿
-$				// ããintnoã«å¯¾ãã¦CFG_INTã§è¨­å®ãããå²è¾¼ã¿åªå
-åº¦ã
-$				// TMIN_INTPRIä»¥ä¸ã§ããå ´åï¼E_OBJï¼ï¼»NGKI3066ï¼½
-				$IF INT.INTPRI[intno] >= TMIN_INTPRI$
-					$ERROR INT.TEXT_LINE[intno]$E_OBJ:$SPC$
-						$FORMAT(_("%1% `%2%\' configured for %3% `%4%\' is lower than or equal to %5%"),
-									"intpri", INT.INTPRI[intno], "inhno",
-									INH.INHNO[inhno], "TMIN_INTPRI")$
-					$END$
-				$END$
-			$END$
-		$END$
-	$END$
-
-	$INHNO_LIST = APPEND(INHNO_LIST, INH.INHNO[inhno])$
-$END$
-
-$
-$  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ï¼ISRï¼ã«é¢ããã¨ã©ã¼ãã§ãã¯
-$
-$FOREACH id ISR.ID_LIST$
-$	// isratrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2998ï¼½
-$	//ï¼TARGET_ISRATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-	$IF (ISR.ISRATR[id] & ~TARGET_ISRATR) != 0$
-		$ERROR ISR.TEXT_LINE[id]$E_RSATR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-						"isratr", ISR.ISRATR[id], "CRE_ISR")$
-		$END$
-	$END$
-
-$	// intnoãCRE_ISRã«å¯¾ããå²è¾¼ã¿çªå·ã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼
-$	// ï¼»NGKI3003ï¼½
-	$IF !LENGTH(FIND(INTNO_CREISR_VALID, ISR.INTNO[id]))$
-		$ERROR ISR.TEXT_LINE[id]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-						"intno", ISR.INTNO[id], "CRE_ISR")$
-		$END$
-	$END$
-
-$	// (TMIN_ISRPRI <= isrpri && isrpri <= TMAX_ISRPRI)ã§ãªãå ´åï¼E_PARï¼
-$	// ï¼»NGKI3005ï¼½
-	$IF !(TMIN_ISRPRI <= ISR.ISRPRI[id] && ISR.ISRPRI[id] <= TMAX_ISRPRI)$
-		$ERROR ISR.TEXT_LINE[id]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-						"isrpri", ISR.ISRPRI[id], "CRE_ISR")$
-		$END$
-	$END$
-$END$
-
-$FOREACH intno INTNO_CREISR_VALID$
-	$inhno = INHNO[intno]$
-
-$	// å²è¾¼ã¿çªå·intnoã«å¯¾ãã¦ç»é²ãããISRã®ãªã¹ãã®ä½æ
-	$isrid_list = {}$
-	$FOREACH id ISR.ID_LIST$
-		$IF ISR.INTNO[id] == intno$
-			$isrid_list = APPEND(isrid_list, id)$
-			$id_for_error = id$
-		$END$
-	$END$
-
-$	// å²è¾¼ã¿çªå·intnoã«å¯¾ãã¦ç»é²ãããISRãå­å¨ããå ´å
-	$IF LENGTH(isrid_list) > 0$
-$		// intnoã«å¯¾å¿ããinhnoã«å¯¾ãã¦DEF_INHãããå ´åï¼E_OBJï¼ï¼»NGKI3013ï¼½
-		$IF LENGTH(INH.INHNO[inhno])$
-			$ERROR ISR.TEXT_LINE[id_for_error]$E_OBJ:$SPC$
-				$FORMAT(_("%1% `%2%\' in %3% is duplicated with %4% `%5%\'"),
-							"intno", ISR.INTNO[id_for_error],
-							"CRE_ISR", "inhno", INH.INHNO[inhno])$
-			$END$
-		$END$
-
-$		// intnoã«å¯¾ããCFG_INTããªãå ´åï¼E_OBJï¼ï¼»NGKI3012ï¼½
-		$IF !LENGTH(INT.INTNO[intno])$
-			$ERROR ISR.TEXT_LINE[id_for_error]$E_OBJ:$SPC$
-				$FORMAT(_("%1% `%2%\' is not configured with %3%"),
-							"intno", ISR.INTNO[id_for_error], "CFG_INT")$
-			$END$
-		$ELSE$
-$			// intnoã«å¯¾ãã¦CFG_INTã§è¨­å®ãããå²è¾¼ã¿åªå
-åº¦ãTMIN_INTPRI
-$			// ãããå°ããå ´åï¼E_OBJï¼ï¼»NGKI3014ï¼½
-			$IF INT.INTPRI[intno] < TMIN_INTPRI$
-				$ERROR INT.TEXT_LINE[intno]$E_OBJ:$SPC$
-					$FORMAT(_("%1% `%2%\' configured for %3% `%4%\' is higher than %5%"),
-								"intpri", INT.INTPRI[intno], "intno",
-								ISR.INTNO[id_for_error], "TMIN_INTPRI")$
-				$END$
-			$END$
-		$END$
-	$END$
-$END$
-
-$
-$  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ï¼ISRï¼ç®¡çã®ãã¼ã¿æ§é 
-$
-$intno_isr_list = {}$
-$FOREACH intno INTNO_CREISR_VALID$
-	$inhno = INHNO[intno]$
-	$IF LENGTH(INT.INTNO[intno]) && !LENGTH(INH.INHNO[inhno])$
-		$intno_isr_list = APPEND(intno_isr_list, intno)$
-	$END$
-$END$
-
-$INTNO_ISR = {}$
-$i = 0$
-$FOREACH intno SORT(intno_isr_list, "INT.INTNO")$
-	$INTNO_ISR = APPEND(INTNO_ISR, intno)$
-	$ISR_QUEUE_HEADER[intno] = FORMAT("&(_kernel_isr_queue_table[%d])", i)$
-	$i = i + 1$
-$END$
-
-const uint_t _kernel_tnum_isr_queue = $LENGTH(INTNO_ISR)$;$NL$
-$NL$
-
-$IF LENGTH(INTNO_ISR)$
-	const ISR_ENTRY _kernel_isr_queue_list[$LENGTH(INTNO_ISR)$] = {$NL$
-	$JOINEACH intno INTNO_ISR ",\n"$
-		$TAB${ $intno$, $ISR_QUEUE_HEADER[intno]$ }
-	$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(QUEUE, _kernel_isr_queue_table);$NL$
-$END$$NL$
-
-$IF LENGTH(INTNO_ISR)$
-	QUEUE _kernel_isr_queue_table[$LENGTH(INTNO_ISR)$];$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(QUEUE, _kernel_isr_queue_table);$NL$
-$END$$NL$
-
-$
-$  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ï¼ISRï¼å¼åºãã®ããã®å²è¾¼ã¿ãã³ãã©
-$
-$FOREACH intno INTNO_ISR$
-	$inhno = INHNO[intno]$
-
-$	// DEF_INH(inhno, { TA_NULL, _kernel_inthdr_<intno> } );
-	$INH.INHNO[inhno] = inhno$
-	$INH.INHATR[inhno] = VALUE("TA_NULL", 0)$
-	$INH.INTHDR[inhno] = CONCAT("_kernel_inthdr_", intno)$
-	$INH.ORDER_LIST = APPEND(INH.ORDER_LIST, inhno)$
-
-$	// ISRç¨ã®å²è¾¼ã¿ãã³ãã©
-	void$NL$
-	_kernel_inthdr_$intno$(void)$NL$
-	{$NL$
-	$TAB$_kernel_call_isr($ISR_QUEUE_HEADER[intno]$);$NL$
-	}$NL$
-	$NL$
-$END$
-
-$
-$  éçã«çæãããå²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã®æ°
-$
-#define TNUM_SISRID	$LENGTH(ISR.ID_LIST)$$NL$
-$NL$
-
-$
-$  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_isrid = (TMIN_ISRID + TNUM_ISRID - 1);$NL$
-const ID _kernel_tmax_sisrid = (TMIN_ISRID + TNUM_SISRID - 1);$NL$
-$NL$
-
-$
-$  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³åæåãã­ãã¯ã®çæ
-$
-$IF LENGTH(ISR.ID_LIST)$
-	const ISRINIB _kernel_isrinib_table[TNUM_SISRID] = {$NL$
-	$JOINEACH id ISR.ID_LIST ",\n"$
-		$TAB${$SPC$
-		($ISR.ISRATR[id]$), ($ISR.EXINF[id]$),$SPC$
-		($ISR_QUEUE_HEADER[ISR.INTNO[id]]$),$SPC$
-		(ISR)($ISR.ISR[id]$), ($ISR.ISRPRI[id]$)$SPC$
-		}$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const ISRINIB, _kernel_isrinib_table);$NL$
-$END$
-$NL$
-
-$
-$  åççæå²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ç¨ã®å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³åæåãã­ãã¯
-$
-$IF num_aisrid > 0$
-	ISRINIB _kernel_aisrinib_table[$num_aisrid$];$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(ISRINIB, _kernel_aisrinib_table);$NL$
-$END$
-$NL$
-
-$
-$  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ç®¡çãã­ãã¯
-$
-$IF num_isrid > 0$
-	ISRCB _kernel_isrcb_table[TNUM_ISRID];$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(ISRCB, _kernel_isrcb_table);$NL$
-$END$
-$NL$
-
-$
-$  å²è¾¼ã¿ãã³ãã©ã®ããã®æ¨æºçãªåæåæ
-å ±ã®çæ
-$
-$IF !OMIT_INITIALIZE_INTERRUPT || USE_INHINIB_TABLE$
-
-$
-$  å®ç¾©ããå²è¾¼ã¿ãã³ãã©ã®æ°
-$
-#define TNUM_DEF_INHNO	$LENGTH(INH.ORDER_LIST)$$NL$
-const uint_t _kernel_tnum_def_inhno = TNUM_DEF_INHNO;$NL$
-$NL$
-
-$
-$  å²è¾¼ã¿ãã³ãã©ã®ã¨ã³ããª
-$
-$FOREACH inhno INH.ORDER_LIST$
-	$IF (INH.INHATR[inhno] & TA_NONKERNEL) == 0$
-		INTHDR_ENTRY($INH.INHNO[inhno]$, $+INH.INHNO[inhno]$,$SPC$
-												$INH.INTHDR[inhno]$)$NL$
-	$END$
-$END$$NL$
-
-$
-$  å²è¾¼ã¿ãã³ãã©åæåãã­ãã¯
-$
-$IF LENGTH(INH.ORDER_LIST)$
-	const INHINIB _kernel_inhinib_table[TNUM_DEF_INHNO] = {$NL$
-	$JOINEACH inhno INH.ORDER_LIST ",\n"$
-		$TAB${$SPC$
-			($INH.INHNO[inhno]$),$SPC$
-			($INH.INHATR[inhno]$),$SPC$
-			$IF (INH.INHATR[inhno] & TA_NONKERNEL) == 0$
-				(FP)(INT_ENTRY($INH.INHNO[inhno]$, $INH.INTHDR[inhno]$))
-			$ELSE$
-				(FP)($INH.INTHDR[inhno]$)
-			$END$$SPC$
-		}$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const INHINIB, _kernel_inhinib_table);$NL$
-$END$$NL$
-$END$
-
-$
-$  å²è¾¼ã¿è¦æ±ã©ã¤ã³ã®ããã®æ¨æºçãªåæåæ
-å ±ã®çæ
-$
-$IF !OMIT_INITIALIZE_INTERRUPT || USE_INTINIB_TABLE$
-
-$
-$  è¨­å®ããå²è¾¼ã¿è¦æ±ã©ã¤ã³ã®æ°
-$
-#define TNUM_CFG_INTNO	$LENGTH(INT.ORDER_LIST)$$NL$
-const uint_t _kernel_tnum_cfg_intno = TNUM_CFG_INTNO;$NL$
-$NL$
-
-$
-$  å²è¾¼ã¿è¦æ±ã©ã¤ã³åæåãã­ãã¯
-$
-$IF LENGTH(INT.ORDER_LIST)$
-	const INTINIB _kernel_intinib_table[TNUM_CFG_INTNO] = {$NL$
-	$JOINEACH intno INT.ORDER_LIST ",\n"$
-		$TAB${$SPC$
-			($INT.INTNO[intno]$),$SPC$
-			($INT.INTATR[intno]$),$SPC$
-			($INT.INTPRI[intno]$)$SPC$
-		}$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const INTINIB, _kernel_intinib_table);$NL$
-$END$$NL$
-$END$
-
-$
-$  å²è¾¼ã¿ç®¡çæ©è½åæåé¢æ°
-$
-$initfuncs = APPEND(initfuncs, "_kernel_initialize_interrupt();")$
-$IF num_isrid > 0$
-	$initfuncs = APPEND(initfuncs, "_kernel_initialize_isr();")$
-$END$
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/interrupt.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/interrupt.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/interrupt.trb	(revision 306)
@@ -0,0 +1,448 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: interrupt.trb 678 2016-03-06 02:36:09Z ertl-hiro $
+# 
+
+#
+#		å²è¾¼ã¿ç®¡çæ©è½ã®çæã¹ã¯ãªãã
+#
+
+#
+#  kernel_cfg.cã®çæ
+#
+$kernelCfgC.comment_header("Interrupt Management Functions")
+
+#
+#  CRE_ISRã§ä½¿ç¨ã§ããå²è¾¼ã¿çªå·ã¨ããã«å¯¾å¿ããå²è¾¼ã¿ãã³ãã©çªå·ã®ã
+#  ãã©ã«ãå®ç¾©
+#
+if $INTNO_CREISR_VALID.nil?
+  $INTNO_CREISR_VALID = $INTNO_VALID
+end
+if $INHNO_CREISR_VALID.nil?
+  $INHNO_CREISR_VALID = $INHNO_VALID
+end
+
+#
+#  CFG_INTã§ä½¿ç¨ã§ããå²è¾¼ã¿åªå
+åº¦ã®ããã©ã«ãå®ç¾©
+# 
+if $INTPRI_CFGINT_VALID.nil?
+  $INTPRI_CFGINT_VALID = $TMIN_INTPRI.upto($TMAX_INTPRI).to_a
+end
+
+#
+#  å²è¾¼ã¿çªå·ã¨å²è¾¼ã¿ãã³ãã©çªå·ã®å¤æãã¼ãã«ã®ä½æ
+#
+if $INTNO_CREISR_VALID.length != $INHNO_CREISR_VALID.length
+  error_exit("length of `INTNO_CREISR_VALID' is different from" \
+									" length of `INHNO_CREISR_VALID'")
+end
+$toInhnoVal = {}
+$toIntnoVal = {}
+inhno_creisr_valid = $INHNO_CREISR_VALID.dup
+$INTNO_CREISR_VALID.each do |intnoVal|
+  inhnoVal = inhno_creisr_valid.shift
+  $toInhnoVal[intnoVal] = inhnoVal
+  $toIntnoVal[inhnoVal] = intnoVal
+end
+
+#
+#  å²è¾¼ã¿è¦æ±ã©ã¤ã³ã«é¢ããã¨ã©ã¼ãã§ãã¯
+#
+$cfgData[:CFG_INT].each do |key, params|
+  #	intnoãå²è¾¼ã¿çªå·ã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼ï¼»NGKI2972ï¼½
+  if $INTNO_VALID.index(params[:intno]).nil?
+    error_illegal("E_PAR", params, :intno)
+  end
+
+  #	intatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2969ï¼½
+  #ï¼TA_ENAINTï¼TA_EDGEï¼TARGET_INTATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+  if (params[:intatr] & ~($TA_ENAINT|$TA_EDGE|$TARGET_INTATR)) != 0
+    error_illegal_sym("E_RSATR", params, :intatr, :intno)
+  end
+
+  #	intpriãCFG_INTã«å¯¾ããå²è¾¼ã¿åªå
+åº¦ã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼
+  #	ï¼»NGKI2973ï¼½
+  if $INTPRI_CFGINT_VALID.index(params[:intpri]).nil?
+    error_illegal_sym("E_OBJ", params, :intpri, :intno)
+  end
+
+  # ã«ã¼ãã«ç®¡çå¤ã«åºå®ããã¦ããintnoã«å¯¾ãã¦ï¼intpriã«TMIN_INTPRIã
+  #	ããå°ããå¤ãæå®ãããªãã£ãå ´åï¼E_OBJï¼ï¼»NGKI2983ï¼½
+  if !$INTNO_FIX_NONKERNEL.nil?
+    if !$INTNO_FIX_NONKERNEL.index(params[:intno]).nil?
+      if params[:intpri] >= $TMIN_INTPRI
+        error_ercd("E_OBJ", params, "%%intno must have higher priority " \
+											"than TMIN_INTPRI in %apiname")
+      end
+    end
+  end
+
+  #	ã«ã¼ãã«ç®¡çã«åºå®ããã¦ããintnoã«å¯¾ãã¦ï¼intpriã«TMIN_INTPRIãã
+  #	ãå°ããå¤ãæå®ãããå ´åï¼E_OBJï¼ï¼»NGKI2984ï¼½
+  if !$INTNO_FIX_KERNEL.nil?
+    if !$INTNO_FIX_KERNEL.index(params[:intno]).nil?
+      if params[:intpri] < $TMIN_INTPRI
+        error_ercd("E_OBJ", params, "%%intno must have lower or equal " \
+									"priority to TMIN_INTPRI in %apiname")
+      end
+    end
+  end
+end
+
+#
+#  å²è¾¼ã¿ãã³ãã©ã«é¢ããã¨ã©ã¼ãã§ãã¯
+#
+$cfgData[:DEF_INH].each do |key, params|
+  # inhnoãå²è¾¼ã¿ãã³ãã©çªå·ã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼ï¼»NGKI3055ï¼½
+  if $INHNO_VALID.index(params[:inhno]).nil?
+    error_illegal("E_PAR", params, :inhno)
+  end
+
+  # inhatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3052ï¼½
+  #ï¼TARGET_INHATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+  if (params[:inhatr] & ~($TARGET_INHATR)) != 0
+    error_illegal_sym("E_RSATR", params, :inhatr, :inhno)
+  end
+
+  #	ã«ã¼ãã«ç®¡çå¤ã«åºå®ããã¦ããinhnoã«å¯¾ãã¦ï¼inhatrã«TA_NONKERNELã
+  #	æå®ããã¦ããªãå ´åï¼E_RSATRï¼ï¼»NGKI3067ï¼½
+  if !$INHNO_FIX_NONKERNEL.nil?
+    if !$INHNO_FIX_NONKERNEL.index(params[:inhno]).nil?
+      if (params[:inhatr] & $TA_NONKERNEL) == 0
+        error_ercd("E_RSATR", params, "%%inhno must be " \
+								"non-kernel interrupt in %apiname")
+      end
+    end
+  end
+
+  #	ã«ã¼ãã«ç®¡çã«åºå®ããã¦ããinhnoã«å¯¾ãã¦ï¼inhatrã«TA_NONKERNELãæ
+  #	å®ããã¦ããå ´åï¼E_RSATRï¼ï¼»NGKI3068ï¼½
+  if !$INHNO_FIX_KERNEL.nil?
+    if !$INHNO_FIX_KERNEL.index(params[:inhno]).nil?
+      if (params[:inhatr] & $TA_NONKERNEL) != 0
+        error_ercd("E_RSATR", params, "%%inhno must not be " \
+								"non-kernel interrupt in %apiname")
+      end
+    end
+  end
+
+  if $toIntnoVal.has_key?(params[:inhno].val)
+    intnoVal = $toIntnoVal[params[:inhno].val]
+
+    # inhnoã«å¯¾å¿ããintnoã«å¯¾ããCFG_INTããªãå ´åï¼E_OBJï¼ï¼»NGKI3062ï¼½
+    if !$cfgData[:CFG_INT].has_key?(intnoVal)
+      error_ercd("E_OBJ", params, "intno `#{intnoVal}' corresponding to " \
+					"%%inhno in %apiname is not configured with CFG_INT")
+    else
+      intnoParams = $cfgData[:CFG_INT][intnoVal]
+      if (params[:inhatr] & $TA_NONKERNEL) == 0
+        # inhatrã«TA_NONKERNELãæå®ããã¦ãããï¼inhnoã«å¯¾å¿ããintno
+        # ã«å¯¾ãã¦CFG_INTã§è¨­å®ãããå²è¾¼ã¿åªå
+åº¦ãTMIN_INTPRIãããå°
+        # ããå ´åï¼E_OBJï¼ï¼»NGKI3065ï¼½
+        if intnoParams[:intpri] < $TMIN_INTPRI
+          error_ercd("E_OBJ", params, "intpri `#{intnoParams[:intpri]}' " \
+				"configured for %%inhno must be lower or equal to TMIN_INTPRI")
+        end
+      else
+        # inhatrã«TA_NONKERNELãæå®ããã¦ããï¼inhnoã«å¯¾å¿ããintnoã«
+        # å¯¾ãã¦CFG_INTã§è¨­å®ãããå²è¾¼ã¿åªå
+åº¦ãTMIN_INTPRIä»¥ä¸ã§ãã
+        # å ´åï¼E_OBJï¼ï¼»NGKI3066ï¼½
+        if intnoParams[:intpri] >= $TMIN_INTPRI
+          error_ercd("E_OBJ", params, "intpri `#{intnoParams[:intpri]}' " \
+					"configured for %%inhno must be higher than TMIN_INTPRI")
+        end
+      end
+    end
+  end
+end
+
+#
+#  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ï¼ISRï¼ã«é¢ããã¨ã©ã¼ãã§ãã¯
+#
+$cfgData[:CRE_ISR].sort.each do |key, params|
+  #	isratrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2998ï¼½
+  #ï¼TARGET_ISRATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+  if (params[:isratr] & ~($TARGET_ISRATR)) != 0
+    error_illegal("E_RSATR", params, "isratr")
+  end
+
+  #	intnoãCRE_ISRã«å¯¾ããå²è¾¼ã¿çªå·ã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼
+  #	ï¼»NGKI3003ï¼½
+  if $INTNO_CREISR_VALID.index(params[:intno]).nil?
+    error_illegal("E_PAR", params, "intno")
+  end
+
+  #	(TMIN_ISRPRI <= isrpri && isrpri <= TMAX_ISRPRI)ã§ãªãå ´åï¼E_PARï¼
+  #	ï¼»NGKI3005ï¼½
+  if !($TMIN_ISRPRI <= params[:isrpri] && params[:isrpri] <= $TMAX_ISRPRI)
+    error_illegal("E_PAR", params, "isrpri")
+  end
+end
+
+$INTNO_CREISR_VALID.each do |intnoVal|
+  # å²è¾¼ã¿çªå·intnoã«å¯¾ãã¦ç»é²ãããISRã®ãªã¹ãã®ä½æ
+  isrParamsList = []
+  $cfgData[:CRE_ISR].sort.each do |key, params|
+    if params[:intno] == intnoVal
+      isrParamsList.push(params)
+    end
+  end
+
+  #	å²è¾¼ã¿çªå·intnoã«å¯¾ãã¦ç»é²ãããISRãå­å¨ããå ´å
+  if isrParamsList.size > 0
+    inhnoVal = $toInhnoVal[intnoVal]
+
+    # intnoã«å¯¾å¿ããinhnoã«å¯¾ãã¦DEF_INHãããå ´åï¼E_OBJï¼ï¼»NGKI3013ï¼½
+    if $cfgData[:DEF_INH].has_key?(inhnoVal)
+      inhnoParams = $cfgData[:DEF_INH][inhnoVal]
+      error_ercd("E_OBJ", isrParamsList[0], "%%intno in %apiname " \
+					"is duplicated with inhno #{inhnoParams[:inhno]}")
+    end
+
+    # intnoã«å¯¾ããCFG_INTããªãå ´åï¼E_OBJï¼ï¼»NGKI3012ï¼½
+    if !$cfgData[:CFG_INT].has_key?(intnoVal)
+      error_ercd("E_OBJ", isrParamsList[0], "%%intno in %apiname " \
+									"is not configured with CFG_INT")
+    else
+      intnoParams = $cfgData[:CFG_INT][intnoVal]
+
+      #	intnoã«å¯¾ãã¦CFG_INTã§è¨­å®ãããå²è¾¼ã¿åªå
+åº¦ãTMIN_INTPRIããã
+      #	å°ããå ´åï¼E_OBJï¼ï¼»NGKI3014ï¼½
+      if intnoParams[:intpri] < $TMIN_INTPRI
+        error_ercd("E_OBJ", isrParamsList[0],
+						"intpri `#{intnoParams[:intpri]}' configured for " \
+						"%%intno with CFG_INT in higher than TMIN_INTPRI")
+      end
+    end
+  end
+end
+
+#
+#  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ï¼ISRï¼ç®¡çã®ãã¼ã¿æ§é 
+#
+intnoIsrList = []
+$INTNO_CREISR_VALID.each do |intnoVal|
+  inhnoVal = $toInhnoVal[intnoVal]
+  if $cfgData[:CFG_INT].has_key?(intnoVal) \
+							&& !$cfgData[:DEF_INH].has_key?(inhnoVal)
+    intnoIsrList.push(intnoVal)
+  end
+end
+
+intnoIsrList.sort!
+$isrQueueHeader = {}
+intnoIsrList.each_with_index do |intnoVal, index|
+  $isrQueueHeader[intnoVal] = "&(_kernel_isr_queue_table[#{index}])"
+end
+
+$kernelCfgC.add2("const uint_t _kernel_tnum_isr_queue = #{intnoIsrList.size};")
+
+if intnoIsrList.size > 0
+  $kernelCfgC.add("const ISR_ENTRY _kernel_isr_queue_list" \
+										"[#{intnoIsrList.size}] = {")
+  intnoIsrList.each_with_index do |intnoVal, index|
+    $kernelCfgC.add(",") if index > 0
+    $kernelCfgC.append("\t{ #{intnoVal}, #{$isrQueueHeader[intnoVal]} }")
+  end
+  $kernelCfgC.add
+  $kernelCfgC.add2("};")
+  $kernelCfgC.add2("QUEUE _kernel_isr_queue_table[#{intnoIsrList.size}];")
+else
+  $kernelCfgC.add("TOPPERS_EMPTY_LABEL(const ISR_ENTRY, " \
+											"_kernel_isr_queue_list);")
+  $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(QUEUE, _kernel_isr_queue_table);")
+end
+
+#
+#  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ï¼ISRï¼å¼åºãã®ããã®å²è¾¼ã¿ãã³ãã©
+#
+intnoIsrList.each do |intnoVal|
+  inhnoVal = $toInhnoVal[intnoVal]
+
+  # æ¬¡ã®DEF_INHã«ç¸å½ãããã¼ã¿ãçæ
+  # DEF_INH(inhno, { TA_NULL, _kernel_inthdr_<intno> } );
+  $cfgData[:DEF_INH][inhnoVal] = {
+    inhno: NumStr.new(inhnoVal),
+    inhatr: NumStr.new($TA_NULL, "TA_NULL"),
+    inthdr: "_kernel_inthdr_#{intnoVal}"
+  }
+
+  # å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ç¨ã®å²è¾¼ã¿ãã³ãã©
+  $kernelCfgC.add("void")
+  $kernelCfgC.add("_kernel_inthdr_#{intnoVal}(void)")
+  $kernelCfgC.add("{")
+  $kernelCfgC.add("\t_kernel_call_isr(#{$isrQueueHeader[intnoVal]});");
+  $kernelCfgC.add2("}")
+end
+
+#
+#  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã«é¢ããä¸è¬çãªæ
+å ±ã®çæ
+#
+class IsrObject < KernelObject
+  def initialize()
+    super("isr", "isr")
+  end
+
+  def prepare(key, params)
+    # ã¨ã©ã¼ãã§ãã¯ã¯å®æ½æ¸ã¿ãªã®ã§ï¼ããã§ã®å¦çã¯ä¸è¦
+  end
+
+  def generateInib(key, params)
+    return("(#{params[:isratr]}), (intptr_t)(#{params[:exinf]}), " \
+						"(#{$isrQueueHeader[params[:intno].val]}), " \
+						"(ISR)(#{params[:isr]}), (#{params[:isrpri]})")
+  end
+end
+IsrObject.new.generate()
+
+# å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³çæé åºãã¼ãã«ã®çæ
+$kernelCfgC.add("const ID _kernel_isrorder_table[TNUM_SISRID] = { ")
+$kernelCfgC.append("\t")
+$cfgData[:CRE_ISR].each_with_index do |(key, params), index|
+  $kernelCfgC.append(", ") if index > 0
+  $kernelCfgC.append("#{params[:isrid]}")
+end
+$kernelCfgC.add
+$kernelCfgC.add2("};")
+
+#
+#  å²è¾¼ã¿ãã³ãã©ã®ããã®æ¨æºçãªåæåæ
+å ±ã®çæ
+#
+if !$OMIT_INITIALIZE_INTERRUPT || $USE_INHINIB_TABLE
+  #
+  #  å®ç¾©ããå²è¾¼ã¿ãã³ãã©ã®æ°
+  #
+  $kernelCfgC.add(<<EOS)
+#define TNUM_DEF_INHNO	#{$cfgData[:DEF_INH].size}
+const uint_t _kernel_tnum_def_inhno = TNUM_DEF_INHNO;
+EOS
+
+  if $cfgData[:DEF_INH].size != 0
+    #
+    #  å²è¾¼ã¿ãã³ãã©ã®ã¨ã³ããª
+    #
+    $cfgData[:DEF_INH].each do |key, params|
+      if (params[:inhatr] & $TA_NONKERNEL) == 0
+        $kernelCfgC.add("INTHDR_ENTRY(#{params[:inhno]}, " \
+						"#{params[:inhno].val}, #{params[:inthdr]})")
+      end
+    end
+    $kernelCfgC.add("")
+
+    #
+    #  å²è¾¼ã¿ãã³ãã©åæåãã­ãã¯
+    #
+    $kernelCfgC.add("const INHINIB _kernel_inhinib_table[TNUM_DEF_INHNO] = {")
+    $cfgData[:DEF_INH].each_with_index do |(key, params), index|
+      $kernelCfgC.add(",") if index > 0
+      if (params[:inhatr] & $TA_NONKERNEL) == 0
+        inthdr = "(FP)(INT_ENTRY(#{params[:inhno]}, #{params[:inthdr]}))"
+      else
+        inthdr = "(FP)(#{params[:inthdr]})"
+      end
+      $kernelCfgC.append("\t{ (#{params[:inhno]}), (#{params[:inhatr]}), " \
+															"#{inthdr} }")
+    end
+    $kernelCfgC.add
+    $kernelCfgC.add2("};")
+  else
+    $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(const INHINIB, " \
+										"_kernel_inhinib_table);")
+  end
+end
+
+#
+#  å²è¾¼ã¿è¦æ±ã©ã¤ã³ã®ããã®æ¨æºçãªåæåæ
+å ±ã®çæ
+#
+if !$OMIT_INITIALIZE_INTERRUPT || $USE_INTINIB_TABLE
+  #
+  #  è¨­å®ããå²è¾¼ã¿è¦æ±ã©ã¤ã³ã®æ°
+  #
+  $kernelCfgC.add(<<EOS)
+#define TNUM_CFG_INTNO	#{$cfgData[:CFG_INT].size}
+const uint_t _kernel_tnum_cfg_intno = TNUM_CFG_INTNO;
+EOS
+
+  #
+  #  å²è¾¼ã¿è¦æ±ã©ã¤ã³åæåãã­ãã¯
+  #
+  if $cfgData[:CFG_INT].size != 0
+    $kernelCfgC.add("const INTINIB _kernel_intinib_table[TNUM_CFG_INTNO] = {")
+    $cfgData[:CFG_INT].each_with_index do |(key, params), index|
+      $kernelCfgC.add(",") if index > 0
+      $kernelCfgC.append("\t{ (#{params[:intno]}), (#{params[:intatr]}), " \
+													"(#{params[:intpri]}) }")
+    end
+    $kernelCfgC.add
+    $kernelCfgC.add2("};")
+  else
+    $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(const INTINIB, " \
+										"_kernel_intinib_table);")
+  end
+end
+
+#
+#  å²è¾¼ã¿ç®¡çæ©è½åæåé¢æ°ã®è¿½å 
+#
+$initializeFunctions.push("_kernel_initialize_interrupt();")
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/kernel.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/kernel.tf	(revision 302)
+++ 	(revision )
@@ -1,483 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2015 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: kernel.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  kernel_cfg.hã®å
-é ­é¨åã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-/* kernel_cfg.h */$NL$
-#ifndef TOPPERS_KERNEL_CFG_H$NL$
-#define TOPPERS_KERNEL_CFG_H$NL$
-
-$
-$  kernel_cfg.cã®å
-é ­é¨åã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/* kernel_cfg.c */$NL$
-#include "kernel/kernel_int.h"$NL$
-#include "kernel_cfg.h"$NL$
-$NL$
-
-#if !(TKERNEL_PRID == 0x0007U && (TKERNEL_PRVER & 0xf000U) == 0x3000U)$NL$
-#error The kernel does not match this configuration file.$NL$
-#endif$NL$
-$NL$
-
-$ 
-$  ã¤ã³ã¯ã«ã¼ããã£ã¬ã¯ãã£ãï¼#includeï¼
-$ 
-/*$NL$
-$SPC$*  Include Directives (#include)$NL$
-$SPC$*/$NL$
-$NL$
-$INCLUDES$
-$NL$
-
-$
-$  ã¹ã¿ãã¯é åã®ç¢ºä¿é¢æ°
-$
-$IF !ISFUNCTION("ALLOC_STACK")$
-$FUNCTION ALLOC_STACK$
-$	// å¤§ããæ¹ã«ä¸¸ãããµã¤ãºã§ç¢ºä¿ããï¼»NGKI1050ï¼½ï¼»NGKI3220ï¼½
-	static STK_T $ARGV[1]$[COUNT_STK_T($ARGV[2]$)];$NL$
-	$RESULT = FORMAT("ROUND_STK_T(%1%)", ARGV[2])$
-$END$
-$END$
-
-$
-$  éç¥ãã³ãã©ã®çæé¢æ°
-$
-$FUNCTION GENERATE_NFYHDR$
-$	// ãã©ã¡ã¼ã¿ãå¤æ°ã«æ ¼ç´
-	$nfymode = ARGV[1]$
-	$nfymode1 = nfymode & 0x0f$
-	$nfymode2 = nfymode & ~0x0f$
-	$par1 = ARGV[2]$
-	$par2 = ARGV[3]$
-	$text_line = ARGV[6]$
-	$objid = ARGV[7]$
-	$apiname = ARGV[8]$
-
-$	// éç¥å¦çã®ãã©ã¡ã¼ã¿æ°ã«ããè£æ­£å¦ç
-	$IF nfymode == TNFY_HANDLER || nfymode1 == TNFY_SETVAR
-								|| nfymode1 == TNFY_SETFLG
-								|| nfymode1 == TNFY_SNDDTQ$
-$		// éç¥å¦çã®ãã©ã¡ã¼ã¿ã2ã¤ã®å ´å
-		$numpar = 2$
-		$epar1 = ARGV[4]$
-		$epar2 = ARGV[5]$
-	$ELSE$
-$		// éç¥å¦çã®ãã©ã¡ã¼ã¿ã1ã¤ã®å ´å
-		$numpar = 1$
-		$epar1 = ARGV[3]$
-		$epar2 = ARGV[4]$
-	$END$
-
-$	// ãã©ã¡ã¼ã¿æ°ã®ãã§ãã¯
-	$IF (numpar == 2 && !LENGTH(par2))
-					|| (nfymode2 != 0 && !LENGTH(epar1))
-					|| (nfymode2 == TENFY_SETFLG && !LENGTH(epar2))$
-$		// ãã©ã¡ã¼ã¿ãè¶³ããªãå ´å
-		$ERROR text_line$
-			$FORMAT(_("too few parameters for %1% `%2%\' of `%3%\' in %4%"),
-										"nfymode", nfymode, objid, apiname)$
-		$END$
-	$ELIF (nfymode2 == 0 && LENGTH(epar1))
-					|| (nfymode2 != TENFY_SETFLG && LENGTH(epar2))$
-$		// ãã©ã¡ã¼ã¿ãå¤ãããå ´å
-		$ERROR text_line$
-			$FORMAT(_("too many parameters for %1% `%2%\' of `%3%\' in %4%"),
-										"nfymode", nfymode, objid, apiname)$
-		$END$
-	$ELIF nfymode == TNFY_HANDLER$
-$		// ã¿ã¤ã ã¤ãã³ããã³ãã©ã®å¼åºã
-		$funcname = FORMAT("(NFYHDR)(%s)", par2)$
-	$ELSE$
-$		// éç¥ãã³ãã©ã®é¢æ°å
-		$funcname = CONCAT("_kernel_nfyhdr_", objid)$
-
-$		// ã¨ã©ã¼éç¥ã®ããã®å¤æ°ã®ã¢ãã¬ã¹ã¨ãªãã¸ã§ã¯ãIDãæ ¼ç´ãã
-$		// å¤æ°ã®çæï¼ã¨ã©ã¼ãã§ãã¯ã®ããã«å¿
-è¦ï¼
-		$IF nfymode2 == TENFY_SETVAR ||  nfymode2 == TENFY_INCVAR$
-			intptr_t *const $funcname$_p_evar =
-			$SPC$(intptr_t *)($epar1$);$NL$$NL$
-		$ELIF nfymode2 == TENFY_ACTTSK || nfymode2 == TENFY_WUPTSK$
-			const ID $funcname$_etskid = $epar1$;$NL$$NL$
-		$ELIF nfymode2 == TENFY_SIGSEM$
-			const ID $funcname$_esemid = $epar1$;$NL$$NL$
-		$ELIF nfymode2 == TENFY_SETFLG$
-			const ID $funcname$_eflgid = $epar1$;$NL$$NL$
-		$ELIF nfymode2 == TENFY_SNDDTQ$
-			const ID $funcname$_edtqid = $epar1$;$NL$$NL$
-		$END$
-
-$		// é¢æ°ã®å
-é ­é¨åã®çæ
-		static void$NL$
-		$funcname$(intptr_t exinf)$NL$
-		{$NL$
-
-		$IF nfymode2 == 0$
-$			// ã¨ã©ã¼éç¥ããªãå ´å
-			$error_code = "(void) "$
-		$ELSE$
-$			// ã¨ã©ã¼éç¥ãããå ´å
-			$TAB$ER		ercd;$NL$
-			$NL$
-			$error_code = "ercd = "$
-		$END$
-
-$		// ã¤ãã³ãéç¥å¦çã®å¦ç
-		$IF nfymode1 == TNFY_SETVAR && nfymode2 == 0$
-$			// å¤æ°ã®è¨­å®
-			$TAB$*((intptr_t *) exinf) = ($par2$);$NL$
-		$ELIF nfymode1 == TNFY_INCVAR && nfymode2 == 0$
-$			// å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã
-			$TAB$*((intptr_t *) exinf) += 1;$NL$
-		$ELIF nfymode1 == TNFY_ACTTSK$
-$			// ã¿ã¹ã¯ã®èµ·å
-			$TAB$$error_code$act_tsk((ID) exinf);$NL$
-		$ELIF nfymode1 == TNFY_WUPTSK$
-$			// ã¿ã¹ã¯ã®èµ·åº
-			$TAB$$error_code$wup_tsk((ID) exinf);$NL$
-		$ELIF nfymode1 == TNFY_SIGSEM$
-$			// ã»ããã©ã®è¿å´
-			$TAB$$error_code$sig_sem((ID) exinf);$NL$
-		$ELIF nfymode1 == TNFY_SETFLG$
-$			// ã¤ãã³ããã©ã°ã®ã»ãã
-			$TAB$$error_code$set_flg(((ID) exinf), $par2$);$NL$
-		$ELIF nfymode1 == TNFY_SNDDTQ$
-$			// ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
-			$TAB$$error_code$psnd_dtq(((ID) exinf), $par2$);$NL$
-		$ELSE$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-									"nfymode", nfymode, objid, apiname)$
-			$END$
-		$END$
-
-		$IF nfymode2 != 0$
-$			// ã¨ã©ã¼éç¥å¦çã®å¦ç
-			$TAB$if (ercd != E_OK) {$NL$
-
-			$IF nfymode2 == TENFY_SETVAR$
-$				// å¤æ°ã®è¨­å®
-				$TAB$$TAB$*$funcname$_p_evar = (intptr_t) ercd;$NL$
-			$ELIF nfymode2 == TENFY_INCVAR$
-$				// å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã
-				$TAB$$TAB$*$funcname$_p_evar += 1;$NL$
-			$ELIF nfymode2 == TENFY_ACTTSK$
-$				// ã¿ã¹ã¯ã®èµ·å
-				$TAB$$TAB$(void) act_tsk($funcname$_etskid);$NL$
-			$ELIF nfymode2 == TENFY_WUPTSK$
-$				// ã¿ã¹ã¯ã®èµ·åº
-				$TAB$$TAB$(void) wup_tsk($funcname$_etskid);$NL$
-			$ELIF nfymode2 == TENFY_SIGSEM$
-$				// ã»ããã©ã®è¿å´
-				$TAB$$TAB$(void) sig_sem($funcname$_esemid);$NL$
-			$ELIF nfymode2 == TENFY_SETFLG$
-$				// ã¤ãã³ããã©ã°ã®ã»ãã
-				$TAB$$TAB$(void) set_flg($funcname$_eflgid, $epar2$);$NL$
-			$ELIF nfymode2 == TENFY_SNDDTQ$
-$				// ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
-				$TAB$$TAB$(void) psnd_dtq
-								($funcname$_edtqid, (intptr_t) ercd);$NL$
-			$ELSE$
-				$ERROR text_line$E_PAR:$SPC$
-					$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"nfymode", nfymode, objid, apiname)$
-				$END$
-			$END$
-
-			$TAB$}$NL$
-		$END$
-
-$		// é¢æ°ã®æ«å°¾é¨åã®çæ
-		}$NL$
-		$NL$
-	$END$
-	$RESULT = funcname$
-$END$
-
-$
-$  åæ©è½ã¢ã¸ã¥ã¼ã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³
-$
-$INCLUDE "kernel/task.tf"$
-$INCLUDE "kernel/semaphore.tf"$
-$INCLUDE "kernel/eventflag.tf"$
-$INCLUDE "kernel/dataqueue.tf"$
-$INCLUDE "kernel/pridataq.tf"$
-$INCLUDE "kernel/mutex.tf"$
-$INCLUDE "kernel/mempfix.tf"$
-$INCLUDE "kernel/cyclic.tf"$
-$INCLUDE "kernel/alarm.tf"$
-$INCLUDE "kernel/interrupt.tf"$
-$INCLUDE "kernel/exception.tf"$
-
-$ 
-$  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é å
-$ 
-/*$NL$
-$SPC$*  Stack Area for Non-task Context$NL$
-$SPC$*/$NL$
-$NL$
-
-$IF !LENGTH(ICS.ORDER_LIST)$
-$	// DEF_ICSããªãå ´åã®ããã©ã«ãå¤ã®è¨­å®
-	#ifdef DEFAULT_ISTK$NL$
-	$NL$
-	#define TOPPERS_ISTKSZ		DEFAULT_ISTKSZ$NL$
-	#define TOPPERS_ISTK		DEFAULT_ISTK$NL$
-	$NL$
-	#else /* DEAULT_ISTK */$NL$
-	$NL$
-	$istksz = ALLOC_STACK("_kernel_istack", "DEFAULT_ISTKSZ")$$NL$
-	#define TOPPERS_ISTKSZ		$istksz$$NL$
-	#define TOPPERS_ISTK		_kernel_istack$NL$
-	$NL$
-	#endif /* DEAULT_ISTK */$NL$
-$ELSE$
-
-$	// éçAPIãDEF_ICSããè¤æ°ããï¼E_OBJï¼ï¼»NGKI3216ï¼½
-	$IF LENGTH(ICS.ORDER_LIST) > 1$
-		$ERROR$E_OBJ: $FORMAT(_("too many %1%"), "DEF_ICS")$$END$
-	$END$
-
-$	// istkszã0ä»¥ä¸ãï¼ã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_ISTKSZï¼ããã
-$	// å°ããå ´åï¼E_PARï¼ï¼»NGKI3254ï¼½
-	$IF ICS.ISTKSZ[1] <= 0 || (TARGET_MIN_ISTKSZ
-									&& ICS.ISTKSZ[1] < TARGET_MIN_ISTKSZ)$
-		$ERROR ICS.TEXT_LINE[1]$E_PAR:$SPC$
-			$FORMAT(_("too small %1% `%2%\' in %3%"),
-						"istksz", ICS.ISTKSZ[1], "DEF_ICS")$
-		$END$
-	$END$
-
-$ 	// istkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼ï¼»NGKI3222ï¼½
-	$IF !EQ(ICS.ISTK[1], "NULL") && CHECK_STKSZ_ALIGN
-							&& (ICS.ISTKSZ[1] & (CHECK_STKSZ_ALIGN - 1))$
-		$ERROR ICS.TEXT_LINE[1]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' in %3% is not aligned"),
-						"istksz", ICS.ISTKSZ[1], "DEF_ICS")$
-		$END$
-	$END$
-
-	$IF EQ(ICS.ISTK[1], "NULL")$
-$		// ã¹ã¿ãã¯é åã®èªåå²ä»ã
-		$istksz = ALLOC_STACK("_kernel_istack", ICS.ISTKSZ[1])$$NL$
-		#define TOPPERS_ISTKSZ		$istksz$$NL$
-		#define TOPPERS_ISTK		_kernel_istack$NL$
-	$ELSE$
-		#define TOPPERS_ISTKSZ		($ICS.ISTKSZ[1]$)$NL$
-		#define TOPPERS_ISTK		(void *)($ICS.ISTK[1]$)$NL$
-	$END$
-$END$
-$NL$
-
-$ éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é å
-const size_t	_kernel_istksz = TOPPERS_ISTKSZ;$NL$
-STK_T *const	_kernel_istk = TOPPERS_ISTK;$NL$
-$NL$
-#ifdef TOPPERS_ISTKPT$NL$
-STK_T *const	_kernel_istkpt = TOPPERS_ISTKPT(TOPPERS_ISTK, TOPPERS_ISTKSZ);$NL$
-#endif /* TOPPERS_ISTKPT */$NL$
-$NL$
-
-$ 
-$  ã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé å
-$ 
-/*$NL$
-$SPC$*  Memory Area Allocated by Kernel$NL$
-$SPC$*/$NL$
-$NL$
-
-$IF !LENGTH(KMM.ORDER_LIST)$
-$	// DEF_KMMããªãå ´åã®ããã©ã«ãå¤ã®è¨­å®
-	#define TOPPERS_KMMSZ		0$NL$
-	#define TOPPERS_KMM			NULL$NL$
-$ELSE$
-
-$	// éçAPIãDEF_KMMããè¤æ°ããï¼E_OBJï¼
-	$IF LENGTH(KMM.ORDER_LIST) > 1$
-		$ERROR$E_OBJ: $FORMAT(_("too many %1%"), "DEF_KMM")$$END$
-	$END$
-
-$	// kmmszã0ä»¥ä¸ã®å ´åï¼E_PARï¼
-	$IF KMM.KMMSZ[1] <= 0$
-		$ERROR KMM.TEXT_LINE[1]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' is zero in %3%"),
-									"kmmsz", KMM.KMMSZ[1], "DEF_KMM")$
-		$END$
-	$END$
-
-$ 	// kmmszãã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´
-$	// åï¼E_PARï¼
-	$IF !EQ(KMM.KMM[1], "NULL") && CHECK_MB_ALIGN
-							&& (KMM.KMMSZ[1] & (CHECK_MB_ALIGN - 1))$
-		$ERROR KMM.TEXT_LINE[1]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' in %3% is not aligned"),
-									"kmmsz", KMM.KMMSZ[1], "DEF_KMM")$
-			$END$
-	$END$
-
-	$IF EQ(KMM.KMM[1], "NULL")$
-$		// ã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé åã®èªåå²ä»ã
-		static MB_T					_kernel_memory[TOPPERS_COUNT_SZ($KMM.KMMSZ[1]$, sizeof(MB_T))];$NL$
-		#define TOPPERS_KMMSZ		TOPPERS_ROUND_SZ($KMM.KMMSZ[1]$, sizeof(MB_T))$NL$
-		#define TOPPERS_KMM			_kernel_memory$NL$
-	$ELSE$
-		#define TOPPERS_KMMSZ		($KMM.KMMSZ[1]$)$NL$
-		#define TOPPERS_KMM			(void *)($KMM.KMM[1]$)$NL$
-	$END$
-$END$
-$NL$
-
-$ ã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé å
-const size_t	_kernel_kmmsz = TOPPERS_KMMSZ;$NL$
-MB_T *const		_kernel_kmm = TOPPERS_KMM;$NL$
-$NL$
-
-$ 
-$  ã¿ã¤ã ã¤ãã³ãç®¡ç
-$ 
-/*$NL$
-$SPC$*  Time Event Management$NL$
-$SPC$*/$NL$
-$NL$
-TMEVTN   _kernel_tmevt_heap[1 + TNUM_TSKID + TNUM_CYCID + TNUM_ALMID];$NL$
-$NL$
-
-$ 
-$  åã¢ã¸ã¥ã¼ã«ã®åæåé¢æ°
-$ 
-/*$NL$
-$SPC$*  Module Initialization Function$NL$
-$SPC$*/$NL$
-$NL$
-void$NL$
-_kernel_initialize_object(void)$NL$
-{$NL$
-$FOREACH func (initfuncs)$
-	$TAB$$func$$NL$
-$END$
-}$NL$
-$NL$
-
-$ 
-$  åæåã«ã¼ãã³ã®å®è¡é¢æ°
-$ 
-/*$NL$
-$SPC$*  Initialization Routine$NL$
-$SPC$*/$NL$
-$NL$
-void$NL$
-_kernel_call_inirtn(void)$NL$
-{$NL$
-$FOREACH order INI.ORDER_LIST$
-$ 	// iniatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3241ï¼½
-$	//ï¼TA_NULLã§ãªãå ´åï¼
-	$IF INI.INIATR[order] != 0$
-		$ERROR INI.TEXT_LINE[order]$E_RSATR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of %3% `%4%\' in %5%"),
-						"iniatr", INI.INIATR[order], "inirtn",
-						INI.INIRTN[order], "ATT_INI")$
-		$END$
-	$END$
-	$TAB$((INIRTN)($INI.INIRTN[order]$))((intptr_t)($INI.EXINF[order]$));$NL$
-$END$
-}$NL$
-$NL$
-
-$ 
-$  çµäºå¦çã«ã¼ãã³ã®å®è¡é¢æ°
-$ 
-/*$NL$
-$SPC$*  Termination Routine$NL$
-$SPC$*/$NL$
-$NL$
-void$NL$
-_kernel_call_terrtn(void)$NL$
-{$NL$
-$FOREACH rorder TER.RORDER_LIST$
-$ 	// teratrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3248ï¼½
-$	//ï¼TA_NULLã§ãªãå ´åï¼
-	$IF TER.TERATR[rorder] != 0$
-		$ERROR TER.TEXT_LINE[rorder]$E_RSATR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of %3% `%4%\' in %5%"),
-						"teratr", TER.TERATR[rorder], "terrtn",
-						TER.TERRTN[rorder], "ATT_TER")$
-		$END$
-	$END$
-	$TAB$((TERRTN)($TER.TERRTN[rorder]$))((intptr_t)($TER.EXINF[rorder]$));$NL$
-$END$
-}$NL$
-$NL$
-
-$
-$  kernel_cfg.hã®æ«å°¾é¨åã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#endif /* TOPPERS_KERNEL_CFG_H */$NL$
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/kernel.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/kernel.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/kernel.trb	(revision 306)
@@ -0,0 +1,563 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: kernel.trb 716 2016-03-31 06:16:23Z ertl-hiro $
+# 
+
+#
+#		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2ã®çæã¹ã¯ãªãã
+#
+
+#
+#  ã¿ã¤ã ã¹ã¿ã³ããã¡ã¤ã«ã®æå®
+#
+$timeStampFileName = "kernel_cfg.timestamp"
+
+#
+#  kernel_cfg.hã®å
+é ­é¨åã®çæ
+#
+$kernelCfgH = GenFile.new("kernel_cfg.h")
+$kernelCfgH.add(<<EOS)
+/* kernel_cfg.h */
+#ifndef TOPPERS_KERNEL_CFG_H
+#define TOPPERS_KERNEL_CFG_H
+EOS
+
+#
+#  kernel_cfg.cã®å
+é ­é¨åã®çæ
+#
+$kernelCfgC = GenFile.new("kernel_cfg.c")
+$kernelCfgC.add(<<EOS)
+/* kernel_cfg.c */
+#include "kernel/kernel_int.h"
+#include "kernel_cfg.h"
+
+#if !(TKERNEL_PRID == 0x0007U && (TKERNEL_PRVER & 0xf000U) == 0x3000U)
+#error The kernel does not match this configuration file.
+#endif
+EOS
+
+#
+#  ã¤ã³ã¯ã«ã¼ããã£ã¬ã¯ãã£ãï¼#includeï¼
+#
+$kernelCfgC.comment_header("Include Directives")
+$includeFiles.each do |file|
+  $kernelCfgC.add("#include #{file}")
+end
+$kernelCfgC.add()
+
+#
+#  ã¹ã¿ãã¯é åã®ç¢ºä¿é¢æ°
+#
+#  ã¹ã¿ãã¯é åã®å®ç¾©åã¨ï¼ã¹ã¿ãã¯é åã®ãµã¤ãºè¨è¿°ãé
+åã§è¿ãï¼
+#
+unless defined? AllocStack()
+  def AllocStack(stack, size)
+    # å¤§ããæ¹ã«ä¸¸ãããµã¤ãºã§ç¢ºä¿ããï¼»NGKI1050ï¼½ï¼»NGKI3220ï¼½
+    $kernelCfgC.add("static STK_T #{stack}[COUNT_STK_T(#{size})];")
+    return("ROUND_STK_T(#{size})")
+  end
+end
+
+#
+#  ã«ã¼ãã«ãªãã¸ã§ã¯ãã«é¢ããæ
+å ±ã®çæï¼ä»®æ³ã¯ã©ã¹ï¼
+#
+class KernelObject
+  def initialize(obj, object, obj_s = obj)
+    @obj = obj
+    @OBJ = obj.tr("a-z", "A-Z")
+    @object = object
+    @obj_s = obj_s
+    @OBJ_S = obj_s.tr("a-z", "A-Z")
+    @objid = (obj + "id").to_sym
+    @api = "CRE_#{@OBJ}".to_sym
+    @inibList = { "#{@OBJ_S}INIB" => "a#{@obj_s}inib_table"}
+  end
+
+  def generate()
+    # AID_@OBJã®å¦ç
+    numAutoObjid = 0
+    $cfgData["AID_#{@OBJ}".to_sym].each do |key, params|
+      numAutoObjid += params["no#{@obj}".to_sym]
+    end
+    numObjid = $cfgData[@api].size + numAutoObjid
+
+    # kernel_cfg.hã®çæ
+    $kernelCfgH.add("#define TNUM_#{@OBJ}ID\t#{numObjid}")
+
+    # ãªãã¸ã§ã¯ãã®IDçªå·ã®ãã¯ã­å®ç¾©ã®çæ
+    $cfgData[@api].sort.each do |key, params|
+      $kernelCfgH.add("#define #{params[@objid]}\t#{params[@objid].val}")
+    end
+    $kernelCfgH.add()
+
+    # ãªãã¸ã§ã¯ãã®IDçªå·ãä¿æããå¤æ°
+    if $USE_EXTERNAL_ID
+      $cfgData[@api].sort.each do |key, params|
+        $kernelCfgC.add("const ID #{params[@objid]}_id" \
+										" = #{params[@objid].val};")
+      end
+      $kernelCfgC.add()
+    end
+
+    # éçã«çæããããªãã¸ã§ã¯ãã®æ°
+    $kernelCfgC.add("#define TNUM_S#{@OBJ}ID\t#{$cfgData[@api].size}")
+
+    # ãªãã¸ã§ã¯ãIDçªå·ã®æå¤§å¤
+    $kernelCfgC.add("const ID _kernel_tmax_#{@obj}id" \
+							" = (TMIN_#{@OBJ}ID + TNUM_#{@OBJ}ID - 1);")
+    $kernelCfgC.add2("const ID _kernel_tmax_s#{@obj}id" \
+							" = (TMIN_#{@OBJ}ID + TNUM_S#{@OBJ}ID - 1);")
+
+    # ãã¼ã¿æ§é 
+    if $cfgData[@api].size > 0
+      # äºåæºåï¼ã¨ã©ã¼ãã§ãã¯ï¼ã¡ã¢ãªé åã®çæï¼
+      $cfgData[@api].sort.each do |key, params|
+        prepare(key, params)
+      end
+
+      # ãªãã¸ã§ã¯ãå
+¨ä½ã«å¯¾ãã¦å¿
+è¦ãªã¡ã¢ãªé åã®çæï¼ãªãã·ã§ã³ï¼
+      if respond_to?(:generateData)
+        generateData()
+      end
+
+      # ãªãã¸ã§ã¯ãåæåãã­ãã¯ã®çæ
+      $kernelCfgC.add("const #{@OBJ_S}INIB _kernel_#{@obj_s}inib_table" \
+													"[TNUM_S#{@OBJ}ID] = {")
+      $cfgData[@api].sort.each_with_index do |(key, params), index|
+        $kernelCfgC.add(",") if index > 0
+        $kernelCfgC.append("\t{ " + generateInib(key, params) + " }")
+      end
+      $kernelCfgC.add
+      $kernelCfgC.add2("};")
+    else
+      $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(const #{@OBJ_S}INIB, " \
+										"_kernel_#{@obj_s}inib_table);")
+    end
+
+    # åççæãªãã¸ã§ã¯ãç¨ã®ãªãã¸ã§ã¯ãåæåãã­ãã¯
+    @inibList.each do |type, array|
+      if numAutoObjid > 0
+        $kernelCfgC.add2("#{type} _kernel_#{array}[#{numAutoObjid}];")
+      else
+        $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(#{type}, _kernel_#{array});")
+      end
+    end
+
+    if numObjid > 0
+      # ãªãã¸ã§ã¯ãç®¡çãã­ãã¯ã®çæ
+      $kernelCfgC.add2("#{@OBJ_S}CB _kernel_#{@obj_s}cb_table" \
+													"[TNUM_#{@OBJ}ID];")
+
+      # ãªãã¸ã§ã¯ãåæåé¢æ°ã®è¿½å 
+      $initializeFunctions.push("_kernel_initialize_#{@object}();")
+    else
+      $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(#{@OBJ_S}CB, " \
+										"_kernel_#{@obj_s}cb_table);")
+    end
+  end
+end
+
+#
+#  éç¥ãã³ãã©ã®çæé¢æ°
+#
+def generateNotifyHandler(key, params, objid)
+  # ãã©ã¡ã¼ã¿ãå¤æ°ã«æ ¼ç´
+  nfymode = params[:nfymode]
+  nfymode1 = nfymode & 0x0f
+  nfymode2 = nfymode & ~0x0f
+  par1 = params[:par1]
+  par2 = params[:par2]
+
+  # éç¥å¦çã®ãã©ã¡ã¼ã¿æ°ã«ããè£æ­£å¦ç
+  if nfymode == $TNFY_HANDLER || nfymode1 == $TNFY_SETVAR \
+								|| nfymode1 == $TNFY_SETFLG \
+								|| nfymode1 == $TNFY_SNDDTQ
+    # éç¥å¦çã®ãã©ã¡ã¼ã¿ã2ã¤ã®å ´å
+	numpar = 2
+	epar1 = params[:par3]
+	epar2 = params[:par4]
+  else
+    # éç¥å¦çã®ãã©ã¡ã¼ã¿ã1ã¤ã®å ´å
+    numpar = 1
+    epar1 = params[:par2]
+    epar2 = params[:par3]
+  end
+
+  # ãã©ã¡ã¼ã¿æ°ã®ãã§ãã¯
+  if (numpar == 2 && par2.nil?) || (nfymode2 != 0 && epar1.nil?) \
+								|| (nfymode2 == $TENFY_SETFLG && epar2.nil?)
+    # ãã©ã¡ã¼ã¿ãè¶³ããªãå ´å
+    error_api(params, "too few parameters for nfymode `#{nfymode}' " \
+											"in %apiname of %#{objid}")
+  elsif (nfymode2 == 0 && !epar1.nil?) \
+					|| (nfymode2 != $TENFY_SETFLG && !epar2.nil?)
+    # ãã©ã¡ã¼ã¿ãå¤ãããå ´å
+    error_api(params, "too many parameters for nfymode `#{nfymode}' " \
+											"in %apiname of %#{objid}")
+  elsif nfymode == $TNFY_HANDLER
+    # ã¿ã¤ã ã¤ãã³ããã³ãã©ã®å¼åºã
+    funcname = "(NFYHDR)(#{par2})"
+  else
+    # éç¥ãã³ãã©ã®é¢æ°å
+    funcname = "_kernel_nfyhdr_#{params[objid]}"
+
+    # ã¨ã©ã¼éç¥ã®ããã®å¤æ°ã®ã¢ãã¬ã¹ã¨ãªãã¸ã§ã¯ãIDãæ ¼ç´ãã
+    # å¤æ°ã®çæï¼ã¨ã©ã¼ãã§ãã¯ã®ããã«å¿
+è¦ï¼
+    if nfymode2 == $TENFY_SETVAR || nfymode2 == $TENFY_INCVAR
+      $kernelCfgC.add2("intptr_t *const #{funcname}_p_evar =" \
+											" (intptr_t *)(#{epar1});")
+    elsif nfymode2 == $TENFY_ACTTSK || nfymode2 == $TENFY_WUPTSK
+      $kernelCfgC.add2("const ID #{funcname}_etskid = #{epar1};")
+    elsif nfymode2 == $TENFY_SIGSEM
+      $kernelCfgC.add2("const ID #{funcname}_esemid = #{epar1};")
+    elsif nfymode2 == $TENFY_SETFLG
+      $kernelCfgC.add2("const ID #{funcname}_eflgid = #{epar1};")
+    elsif nfymode2 == $TENFY_SNDDTQ
+      $kernelCfgC.add2("const ID #{funcname}_edtqid = #{epar1};")
+    end
+
+    # é¢æ°ã®å
+é ­é¨åã®çæ
+    $kernelCfgC.add("static void")
+    $kernelCfgC.add("#{funcname}(intptr_t exinf)")
+    $kernelCfgC.add("{")
+
+    if nfymode2 == 0
+      # ã¨ã©ã¼éç¥ããªãå ´å
+      errorCode = "(void) "
+    else
+      # ã¨ã©ã¼éç¥ãããå ´å
+      $kernelCfgC.add2("\tER\tercd;")
+      errorCode = "ercd = "
+    end
+
+    # ã¤ãã³ãéç¥å¦çã®å¦ç
+    if nfymode1 == $TNFY_SETVAR && nfymode2 == 0
+      # å¤æ°ã®è¨­å®
+      $kernelCfgC.add("\t*((intptr_t *) exinf) = (#{par2});")
+    elsif nfymode1 == $TNFY_INCVAR && nfymode2 == 0
+      # å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã
+      $kernelCfgC.add("\t(void) loc_cpu();")
+      $kernelCfgC.add("\t*((intptr_t *) exinf) += 1;")
+      $kernelCfgC.add("\t(void) unl_cpu();")
+    elsif nfymode1 == $TNFY_ACTTSK
+      # ã¿ã¹ã¯ã®èµ·å
+      $kernelCfgC.add("\t#{errorCode}act_tsk((ID) exinf);")
+    elsif nfymode1 == $TNFY_WUPTSK
+      # ã¿ã¹ã¯ã®èµ·åº
+      $kernelCfgC.add("\t#{errorCode}wup_tsk((ID) exinf);")
+    elsif nfymode1 == $TNFY_SIGSEM
+      # ã»ããã©ã®è¿å´
+      $kernelCfgC.add("\t#{errorCode}sig_sem((ID) exinf);")
+    elsif nfymode1 == $TNFY_SETFLG
+      # ã¤ãã³ããã©ã°ã®ã»ãã
+      $kernelCfgC.add("\t#{errorCode}set_flg(((ID) exinf), #{par2});")
+    elsif nfymode1 == $TNFY_SNDDTQ
+      # ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
+      $kernelCfgC.add("\t#{errorCode}psnd_dtq(((ID) exinf), #{par2});")
+    else
+      error_illegal_id("E_PAR", params, :nfymode, objid)
+    end
+			
+    if nfymode2 != 0
+      # ã¨ã©ã¼éç¥å¦çã®å¦ç
+      $kernelCfgC.add("\tif (ercd != E_OK) {")
+
+
+      if nfymode2 == $TENFY_SETVAR
+        # å¤æ°ã®è¨­å®
+        $kernelCfgC.add("\t\t*#{funcname}_p_evar = (intptr_t) ercd;")
+      elsif nfymode2 == $TENFY_INCVAR
+        # å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã
+        $kernelCfgC.add("\t\t(void) loc_cpu();")
+        $kernelCfgC.add("\t\t*#{funcname}_p_evar += 1;")
+        $kernelCfgC.add("\t\t(void) unl_cpu();")
+      elsif nfymode2 == $TENFY_ACTTSK
+        # ã¿ã¹ã¯ã®èµ·å
+        $kernelCfgC.add("\t\t(void) act_tsk(#{funcname}_etskid);")
+      elsif nfymode2 == $TENFY_WUPTSK
+        # ã¿ã¹ã¯ã®èµ·åº
+        $kernelCfgC.add("\t\t(void) wup_tsk(#{funcname}_etskid);")
+      elsif nfymode2 == $TENFY_SIGSEM
+        # ã»ããã©ã®è¿å´
+        $kernelCfgC.add("\t\t(void) sig_sem(#{funcname}_esemid);")
+      elsif nfymode2 == $TENFY_SETFLG
+        # ã¤ãã³ããã©ã°ã®ã»ãã
+        $kernelCfgC.add("\t\t(void) set_flg(#{funcname}_eflgid, #{epar2});")
+      elsif nfymode2 == $TENFY_SNDDTQ
+        # ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
+        $kernelCfgC.add("\t\t(void) psnd_dtq(#{funcname}_edtqid," \
+													" (intptr_t) ercd);")
+      else
+        error_illegal_id("E_PAR", params, :nfymode, objid)
+      end
+      $kernelCfgC.add("\t}")
+    end
+
+    # é¢æ°ã®æ«å°¾é¨åã®çæ
+    $kernelCfgC.add2("}")
+  end
+  return(funcname)
+end
+
+#
+#  åæ©è½ã¢ã¸ã¥ã¼ã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³
+#
+$initializeFunctions = []
+IncludeTrb("kernel/task.trb")
+IncludeTrb("kernel/semaphore.trb")
+IncludeTrb("kernel/eventflag.trb")
+IncludeTrb("kernel/dataqueue.trb")
+IncludeTrb("kernel/pridataq.trb")
+IncludeTrb("kernel/mutex.trb")
+IncludeTrb("kernel/mempfix.trb")
+IncludeTrb("kernel/cyclic.trb")
+IncludeTrb("kernel/alarm.trb")
+IncludeTrb("kernel/interrupt.trb")
+IncludeTrb("kernel/exception.trb")
+
+#
+#  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é å
+#
+$kernelCfgC.comment_header("Stack Area for Non-task Context")
+
+if $cfgData[:DEF_ICS].size == 0
+  # DEF_ICSããªãå ´åã®ããã©ã«ãå¤ã®è¨­å®
+  if $DEFAULT_ISTK.nil?
+    # ã¹ã¿ãã¯é åã®èªåå²ä»ã
+    istksz = AllocStack("_kernel_istack", "DEFAULT_ISTKSZ")
+    istk = "_kernel_istack"
+  else
+    istksz = "DEFAULT_ISTKSZ"
+    istk = "DEFAULT_ISTK"
+  end
+else
+  # éçAPIãDEF_ICSããè¤æ°ããï¼E_OBJï¼ï¼»NGKI3216ï¼½
+  if $cfgData[:DEF_ICS].size > 1
+    error("E_OBJ: too many DEF_ICS")
+  end
+
+  # DEF_ICSãããå ´åã®å¦ç
+  params = $cfgData[:DEF_ICS][1]
+
+  # ãã©ã¡ã¼ã¿ãçç¥ãããæã®ããã©ã«ãå¤ã®è¨­å®
+  params[:istk] ||= "NULL"
+
+  # istkszãã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_ISTKSZï¼æªå®ç¾©ã®å ´åã¯1ï¼
+  # ãããå°ããå ´åï¼E_PARï¼ï¼»NGKI3254ï¼½
+  if params[:istksz] < $TARGET_MIN_ISTKSZ
+    error_wrong("E_PAR", params, :istksz, "too small")
+  end
+
+  if params[:istk] == "NULL"
+    # ã¹ã¿ãã¯é åã®èªåå²ä»ã
+    istksz = AllocStack("_kernel_istack", params[:istksz])
+    istk = "_kernel_istack"
+  else
+    # istkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼ï¼»NGKI3222ï¼½
+    if (params[:istksz] & ($CHECK_STKSZ_ALIGN - 1)) != 0
+      error_wrong("E_PAR", params, :istksz, "not aligned")
+    end
+
+    istksz = "(#{params[:istksz]})"
+    istk = "(void *)(#{params[:istk]})"
+  end
+end
+
+$kernelCfgC.add(<<EOS)
+const size_t _kernel_istksz = #{istksz};
+STK_T *const _kernel_istk = #{istk};
+
+#ifdef TOPPERS_ISTKPT
+STK_T *const _kernel_istkpt = TOPPERS_ISTKPT(#{istk}, #{istksz});
+#endif /* TOPPERS_ISTKPT */
+EOS
+
+#
+#  ã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé å
+#
+$kernelCfgC.comment_header("Memory Area Allocated by Kernel")
+
+if $cfgData[:DEF_KMM].size == 0
+  # DEF_KMMããªãå ´åã®ããã©ã«ãå¤ã®è¨­å®
+  kmmsz = "0"
+  kmm = "NULL"
+else
+  # éçAPIãDEF_KMMããè¤æ°ããï¼E_OBJï¼
+  if ($cfgData[:DEF_KMM].size > 1)
+    error("E_OBJ: too many DEF_KMM")
+  end
+
+  # DEF_KMMãããå ´åã®å¦ç
+  params = $cfgData[:DEF_KMM][1]
+
+  # ãã©ã¡ã¼ã¿ãçç¥ãããæã®ããã©ã«ãå¤ã®è¨­å®
+  params[:kmm] ||= "NULL"
+
+  # kmmszã0ã®å ´åï¼E_PARï¼
+  if params[:kmmsz] == 0
+    error_wrong("E_PAR", params, :kmmsz, "zero")
+  end
+
+  if params[:kmm] == "NULL"
+    # ã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé åã®èªåå²ä»ã
+    $kernelCfgC.add("static MB_T _kernel_memory" \
+					"[TOPPERS_COUNT_SZ(#{params[:kmmsz]}, sizeof(MB_T))];")
+    kmmsz = "TOPPERS_ROUND_SZ(#{params[:kmmsz]}, sizeof(MB_T))"
+    kmm = "_kernel_memory"
+  else
+    # kmmszãã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´å
+    # ï¼E_PARï¼
+    if (params[:kmmsz] & ($CHECK_MB_ALIGN - 1)) != 0
+      error_wrong("E_PAR", params, :kmmsz, "not aligned")
+    end
+
+    kmmsz = "(#{params[:kmmsz]})"
+    kmm = "(void *)(#{params[:kmm]})"
+  end
+end
+
+$kernelCfgC.add(<<EOS)
+const size_t _kernel_kmmsz = #{kmmsz};
+MB_T *const _kernel_kmm = #{kmm};
+EOS
+
+#
+#  ã¿ã¤ã ã¤ãã³ãç®¡ç
+#
+$kernelCfgC.comment_header("Time Event Management")
+$kernelCfgC.add(<<EOS)
+TMEVTN   _kernel_tmevt_heap[1 + TNUM_TSKID + TNUM_CYCID + TNUM_ALMID];
+EOS
+
+#
+#  åã¢ã¸ã¥ã¼ã«ã®åæåé¢æ°
+#
+$kernelCfgC.comment_header("Module Initialization Function")
+$kernelCfgC.append(<<EOS)
+void
+_kernel_initialize_object(void)
+{
+EOS
+$initializeFunctions.each do |func|
+  $kernelCfgC.add("\t#{func}")
+end
+$kernelCfgC.add2("}")
+
+#
+#  åæåã«ã¼ãã³æ©è½
+#
+$kernelCfgC.comment_header("Initialization Routine")
+
+# ã¨ã©ã¼ãã§ãã¯
+$cfgData[:ATT_INI].each do |key, params|
+  # iniatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3241ï¼½
+  #ï¼TA_NULLã§ãªãå ´åï¼
+  if (params[:iniatr] != $TA_NULL)
+    error_illegal_sym("E_RSATR", params, :iniatr, :inirtn)
+  end
+end
+
+# åæåã«ã¼ãã³ã®å®è¡é¢æ°ã®çæ
+$kernelCfgC.append(<<EOS)
+void
+_kernel_call_inirtn(void)
+{
+EOS
+$cfgData[:ATT_INI].each do |key, params|
+  $kernelCfgC.add("\t((INIRTN)(#{params[:inirtn]}))" \
+								"((intptr_t)(#{params[:exinf]}));")
+end
+$kernelCfgC.add2("}")
+
+#
+#  çµäºå¦çã«ã¼ãã³æ©è½
+#
+$kernelCfgC.comment_header("Termination Routine")
+
+# ã¨ã©ã¼ãã§ãã¯
+$cfgData[:ATT_TER].each do |key, params|
+  # teratrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3248ï¼½
+  #ï¼TA_NULLã§ãªãå ´åï¼
+  if (params[:teratr] != $TA_NULL)
+    error_illegal_sym("E_RSATR", params, :teratr, :terrtn)
+  end
+end
+
+# çµäºå¦çã«ã¼ãã³ã®å®è¡é¢æ°ã®çæ
+$kernelCfgC.append(<<EOS)
+void
+_kernel_call_terrtn(void)
+{
+EOS
+$cfgData[:ATT_TER].reverse_each do |key, params|
+  $kernelCfgC.add("\t((TERRTN)(#{params[:terrtn]}))" \
+								"((intptr_t)(#{params[:exinf]}));")
+end
+$kernelCfgC.add2("}")
+
+#
+#  kernel_cfg.hã®æ«å°¾é¨åã®çæ
+#
+$kernelCfgH.append(<<EOS)
+#endif /* TOPPERS_KERNEL_CFG_H */
+EOS
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_api.csv
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_api.csv	(revision 302)
+++ 	(revision )
@@ -1,27 +1,0 @@
-tsk,CRE_TSK,#tskid { .tskatr &exinf &task +itskpri .stksz &stk },,
-atsk,AID_TSK,.notsk,,
-sem,CRE_SEM,#semid { .sematr .isemcnt .maxsem },,
-asem,AID_SEM,.nosem,,
-flg,CRE_FLG,#flgid { .flgatr .iflgptn },,
-aflg,AID_FLG,.nosem,,
-dtq,CRE_DTQ,#dtqid { .dtqatr .dtqcnt &dtqmb },,
-adtq,AID_DTQ,.nodtq,,
-pdq,CRE_PDQ,#pdqid { .pdqatr .pdqcnt +maxdpri &pdqmb },,
-apdq,AID_PDQ,.nopdq,,
-mtx,CRE_MTX,#mtxid { .mtxatr +ceilpri? },,
-amtx,AID_MTX,.nomtx,,
-mpf,CRE_MPF,#mpfid { .mpfatr .blkcnt .blksz &mpf &mpfmb },,
-ampf,AID_MPF,.nompf,,
-cyc,CRE_CYC,#cycid { .cycatr { .nfymode &par1 &par2? &par3? &par4? } .cyctim .cycphs },,
-acyc,AID_CYC,.nocyc,,
-alm,CRE_ALM,#almid { .almatr { .nfymode &par1 &par2? &par3? &par4? } },,
-aalm,AID_ALM,.noalm,,
-int,CFG_INT,.intno { .intatr +intpri },,
-isr,CRE_ISR,#isrid { .isratr &exinf .intno &isr +isrpri },,
-aisr,AID_ISR,.noisr,,
-inh,DEF_INH,.inhno { .inhatr &inthdr },,
-exc,DEF_EXC,.excno { .excatr &exchdr },,
-ics,DEF_ICS,{ .istksz &istk },-1,
-kmm,DEF_KMM,{ .kmmsz &kmm },-1,
-ini,ATT_INI,{ .iniatr &exinf &inirtn },-1,
-ter,ATT_TER,{ .teratr &exinf &terrtn },-1,
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_api.def
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_api.def	(revision 306)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_api.def	(revision 306)
@@ -0,0 +1,27 @@
+CRE_TSK #tskid* { .tskatr &exinf &task +itskpri .stksz &stk? }
+AID_TSK .notsk
+CRE_SEM #semid* { .sematr .isemcnt .maxsem }
+AID_SEM .nosem
+CRE_FLG #flgid* { .flgatr .iflgptn }
+AID_FLG .noflg
+CRE_DTQ #dtqid* { .dtqatr .dtqcnt &dtqmb? }
+AID_DTQ .nodtq
+CRE_PDQ #pdqid* { .pdqatr .pdqcnt +maxdpri &pdqmb? }
+AID_PDQ .nopdq
+CRE_MTX #mtxid* { .mtxatr +ceilpri? }
+AID_MTX .nomtx
+CRE_MPF #mpfid* { .mpfatr .blkcnt .blksz &mpf? &mpfmb? }
+AID_MPF .nompf
+CRE_CYC #cycid* { .cycatr { .nfymode &par1 &par2? &par3? &par4? } .cyctim .cycphs }
+AID_CYC .nocyc
+CRE_ALM #almid* { .almatr { .nfymode &par1 &par2? &par3? &par4? } }
+AID_ALM .noalm
+CFG_INT .intno* { .intatr +intpri }
+CRE_ISR #isrid* { .isratr &exinf .intno &isr +isrpri }
+AID_ISR .noisr
+DEF_INH .inhno* { .inhatr &inthdr }
+DEF_EXC .excno* { .excatr &exchdr }
+DEF_ICS { .istksz &istk? }
+DEF_KMM { .kmmsz &kmm? }
+ATT_INI { .iniatr &exinf &inirtn }
+ATT_TER { .teratr &exinf &terrtn }
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_check.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_check.tf	(revision 302)
+++ 	(revision )
@@ -1,422 +1,0 @@
-$ 
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2008-2015 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$  
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$  
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: kernel_check.tf 463 2015-10-18 14:25:55Z ertl-hiro $
-$  
-
-$
-$		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹3ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  ãã¼ã¿ã»ã¯ã·ã§ã³ã®LMAããVMAã¸ã®ã³ãã¼
-$
-$FOREACH lma LMA.ORDER_LIST$
-	$start_data = SYMBOL(LMA.START_DATA[lma])$
-	$end_data = SYMBOL(LMA.END_DATA[lma])$
-	$start_idata = SYMBOL(LMA.START_IDATA[lma])$
-	$IF !LENGTH(start_data)$
-		$ERROR$$FORMAT(_("symbol '%1%' not found"), LMA.START_DATA[lma])$$END$
-	$ELIF !LENGTH(end_data)$
-		$ERROR$$FORMAT(_("symbol '%1%' not found"), LMA.END_DATA[lma])$$END$
-	$ELIF !LENGTH(start_idata)$
-		$ERROR$$FORMAT(_("symbol '%1%' not found"), LMA.START_IDATA[lma])$$END$
-	$ELSE$
-		$BCOPY(start_idata, start_data, end_data - start_data)$
-	$END$
-$END$
-
-$
-$  éç¥æ
-å ±ã®ãã§ãã¯é¢æ°
-$
-$tmax_tskid = PEEK(SYMBOL("_kernel_tmax_tskid"), sizeof_ID)$
-$tmax_semid = PEEK(SYMBOL("_kernel_tmax_semid"), sizeof_ID)$
-$tmax_flgid = PEEK(SYMBOL("_kernel_tmax_flgid"), sizeof_ID)$
-$tmax_dtqid = PEEK(SYMBOL("_kernel_tmax_dtqid"), sizeof_ID)$
-
-$FUNCTION CHECK_NFYHDR$
-$	// ãã©ã¡ã¼ã¿ãå¤æ°ã«æ ¼ç´
-	$nfymode = ARGV[1]$
-	$nfymode1 = nfymode & 0x0f$
-	$nfymode2 = nfymode & ~0x0f$
-	$exinf = ARGV[2]$
-	$nfyhdr = ARGV[3]$
-	$par1 = ARGV[4]$
-	$par2 = ARGV[5]$
-	$text_line = ARGV[8]$
-	$objid = ARGV[9]$
-	$apiname = ARGV[10]$
-	$funcname = CONCAT("_kernel_nfyhdr_", objid)$
-
-$	// éç¥å¦çã®ãã©ã¡ã¼ã¿æ°ã«ããè£æ­£å¦ç
-	$IF nfymode1 == TNFY_SETVAR || nfymode1 == TNFY_SETFLG
-											|| nfymode1 == TNFY_SNDDTQ$
-$		// éç¥å¦çã®ãã©ã¡ã¼ã¿ã2ã¤ã®å ´å
-		$epar1 = ARGV[6]$
-		$epar2 = ARGV[7]$
-	$ELSE$
-$		// éç¥å¦çã®ãã©ã¡ã¼ã¿ã1ã¤ã®å ´å
-		$epar1 = ARGV[5]$
-		$epar2 = ARGV[6]$
-	$END$
-
-$	// ã¿ã¤ã ã¤ãã³ããã³ãã©ã®å
-é ­çªå°ã®ãã§ãã¯ï¼»NGKI3693ï¼½
-	$IF nfymode == TNFY_HANDLER$
-		$tmehdr = nfyhdr$
-		$IF CHECK_FUNC_ALIGN && (tmehdr & (CHECK_FUNC_ALIGN - 1)) != 0$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-										"tmehdr", par2, objid, apiname)$
-				$END$
-		$END$
-		$IF CHECK_FUNC_NONNULL && tmehdr == 0$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is null"),
-										"tmehdr", par2, objid, apiname)$
-			$END$
-		$END$
-	$END$
-
-$	// ã¤ãã³ãéç¥å¦çã®å¤æ°ã®çªå°ã¨ãªãã¸ã§ã¯ãIDã®ãã§ãã¯
-	$IF nfymode1 == TNFY_SETVAR || nfymode1 == TNFY_INCVAR$
-$		// å¤æ°ã®è¨­å®ï¼ã¤ã³ã¯ãªã¡ã³ãã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
-		$p_var = exinf$
-
-$		// å¤æ°ã®çªå°ã®ãã§ãã¯ï¼»NGKI3699ï¼½ï¼»NGKI3897ï¼½
-		$IF CHECK_INTPTR_ALIGN && (p_var & (CHECK_INTPTR_ALIGN - 1)) != 0$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-										"p_var", par1, objid, apiname)$
-			$END$
-		$END$
-		$IF CHECK_INTPTR_NONNULL && p_var == 0$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is null"),
-										"p_var", par1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode1 == TNFY_ACTTSK || nfymode1 == TNFY_WUPTSK$
-$		// ã¿ã¹ã¯ã®èµ·åï¼èµ·åºã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
-		$tskid = exinf$
-
-$		// ã¿ã¹ã¯IDã®ãã§ãã¯ï¼»NGKI3704ï¼½
-		$IF !(TMIN_TSKID <= tskid && tskid <= tmax_tskid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"tskid", par1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode1 == TNFY_SIGSEM$
-$		// ã»ããã©ã®è³æºã®è¿å´ã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
-		$semid = exinf$
-
-$		// ã»ããã©IDã®ãã§ãã¯ï¼»NGKI3707ï¼½
-		$IF !(TMIN_SEMID <= semid && semid <= tmax_semid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"semid", par1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode1 == TNFY_SETFLG$
-$		// ã¤ãã³ããã©ã°ã®ã»ããã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
-		$flgid = exinf$
-
-$		// ã¤ãã³ããã©ã°IDã®ãã§ãã¯ï¼»NGKI3710ï¼½
-		$IF !(TMIN_FLGID <= flgid && flgid <= tmax_flgid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"flgid", par1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode1 == TNFY_SNDDTQ$
-$		// ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
-		$dtqid = exinf$
-
-$		// ãã¼ã¿ã­ã¥ã¼IDã®ãã§ãã¯ï¼»NGKI3713ï¼½
-		$IF !(TMIN_DTQID <= dtqid && dtqid <= tmax_dtqid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"dtqid", par1, objid, apiname)$
-			$END$
-		$END$
-	$END$
-
-$	// ã¨ã©ã¼éç¥å¦çã®å¤æ°ã®çªå°ã¨ãªãã¸ã§ã¯ãIDã®ãã§ãã¯
-	$IF nfymode2 == TENFY_SETVAR || nfymode2 == TENFY_INCVAR$
-$		// å¤æ°ã®è¨­å®ï¼ã¤ã³ã¯ãªã¡ã³ãã«ããã¨ã©ã¼ã®éç¥
-		$p_var = PEEK(SYMBOL(CONCAT(funcname, "_p_evar")), sizeof_intptr_t)$
-
-$		// å¤æ°ã®çªå°ã®ãã§ãã¯ï¼»NGKI3701ï¼½ï¼»NGKI3897ï¼½
-		$IF CHECK_INTPTR_ALIGN && (p_var & (CHECK_INTPTR_ALIGN - 1)) != 0$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-										"p_var", epar1, objid, apiname)$
-			$END$
-		$END$
-		$IF CHECK_INTPTR_NONNULL && p_var == 0$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is null"),
-										"p_var", epar1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode2 == TENFY_ACTTSK || nfymode2 == TENFY_WUPTSK$
-$		// ã¿ã¹ã¯ã®èµ·åï¼èµ·åºã«ããã¨ã©ã¼ã®éç¥
-		$tskid = PEEK(SYMBOL(CONCAT(funcname, "_etskid")), sizeof_ID)$
-
-$		// ã¿ã¹ã¯IDã®ãã§ãã¯ï¼»NGKI3704ï¼½
-		$IF !(TMIN_TSKID <= tskid && tskid <= tmax_tskid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"tskid", epar1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode2 == TENFY_SIGSEM$
-$		// ã»ããã©ã®è³æºã®è¿å´ã«ããã¨ã©ã¼ã®éç¥
-		$semid = PEEK(SYMBOL(CONCAT(funcname, "_esemid")), sizeof_ID)$
-
-$		// ã»ããã©IDã®ãã§ãã¯ï¼»NGKI3707ï¼½
-		$IF !(TMIN_SEMID <= semid && semid <= tmax_semid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"semid", epar1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode2 == TENFY_SETFLG$
-$		// ã¤ãã³ããã©ã°ã®ã»ããã«ããã¨ã©ã¼ã®éç¥
-		$flgid = PEEK(SYMBOL(CONCAT(funcname, "_eflgid")), sizeof_ID)$
-
-$		// ã¤ãã³ããã©ã°IDã®ãã§ãã¯ï¼»NGKI3710ï¼½
-		$IF !(TMIN_FLGID <= flgid && flgid <= tmax_flgid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"flgid", epar1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode2 == TENFY_SNDDTQ$
-$		// ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããã¨ã©ã¼ã®éç¥
-		$dtqid = PEEK(SYMBOL(CONCAT(funcname, "_edtqid")), sizeof_ID)$
-
-$		// ãã¼ã¿ã­ã¥ã¼IDã®ãã§ãã¯ï¼»NGKI3715ï¼½
-		$IF !(TMIN_DTQID <= dtqid && dtqid <= tmax_dtqid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"dtqid", epar1, objid, apiname)$
-			$END$
-		$END$
-	$END$
-$END$
-
-$ 
-$  ã¿ã¹ã¯ã«é¢ãããã§ãã¯
-$ 
-$tinib = SYMBOL("_kernel_tinib_table")$
-$FOREACH tskid TSK.ID_LIST$
-$	// ã¿ã¹ã¯ã®å
-é ­çªå°ã®ãã§ãã¯ï¼»NGKI1033ï¼½
-	$task = PEEK(tinib + offsetof_TINIB_task, sizeof_FP)$
-	$IF CHECK_FUNC_ALIGN && (task & (CHECK_FUNC_ALIGN - 1)) != 0$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-							"task", TSK.TASK[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-	$IF CHECK_FUNC_NONNULL && task == 0$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is null"),
-							"task", TSK.TASK[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-
-$	// ã¿ã¹ã¯ã®ã¹ã¿ãã¯é åã®å
-é ­çªå°ã®ãã§ãã¯ï¼»NGKI1056ï¼½
-	$IF USE_TSKINICTXB$
-		$stk = GET_STK_TSKINICTXB(tinib)$
-	$ELSE$
-		$stk = PEEK(tinib + offsetof_TINIB_stk, sizeof_void_ptr)$
-	$END$
-	$IF CHECK_STACK_ALIGN && (stk & (CHECK_STACK_ALIGN - 1)) != 0$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-							"stk", TSK.STK[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-	$IF CHECK_STACK_NONNULL && stk == 0$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is null"),
-							"stk", TSK.STK[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-
-	$tinib = tinib + sizeof_TINIB$
-$END$
-
-$ 
-$  å¨æéç¥ã«é¢ãããã§ãã¯
-$ 
-$cycinib = SYMBOL("_kernel_cycinib_table")$
-$FOREACH cycid CYC.ID_LIST$
-	$exinf = PEEK(cycinib + offsetof_CYCINIB_exinf, sizeof_intptr_t)$
-	$nfyhdr = PEEK(cycinib + offsetof_CYCINIB_nfyhdr, sizeof_FP)$
-
-$	// éç¥æ
-å ±ã®ãã§ãã¯
-	$CHECK_NFYHDR(CYC.NFYMODE[cycid], exinf, nfyhdr,
-						CYC.PAR1[cycid], CYC.PAR2[cycid],
-						CYC.PAR3[cycid], CYC.PAR4[cycid],
-						CYC.TEXT_LINE[cycid], cycid, "CRE_CYC")$
-
-	$cycinib = cycinib + sizeof_CYCINIB$
-$END$
-
-$ 
-$  ã¢ã©ã¼ã éç¥ã«é¢ãããã§ãã¯
-$ 
-$alminib = SYMBOL("_kernel_alminib_table")$
-$FOREACH almid ALM.ID_LIST$
-	$exinf = PEEK(alminib + offsetof_ALMINIB_exinf, sizeof_intptr_t)$
-	$nfyhdr = PEEK(alminib + offsetof_ALMINIB_nfyhdr, sizeof_FP)$
-
-$	// éç¥æ
-å ±ã®ãã§ãã¯
-	$CHECK_NFYHDR(ALM.NFYMODE[almid], exinf, nfyhdr,
-						ALM.PAR1[almid], ALM.PAR2[almid],
-						ALM.PAR3[almid], ALM.PAR4[almid],
-						ALM.TEXT_LINE[almid], almid, "CRE_ALM")$
-
-	$alminib = alminib + sizeof_ALMINIB$
-$END$
-
-$ 
-$  åºå®é·ã¡ã¢ãªãã¼ã«ã«é¢ãããã§ãã¯
-$ 
-$mpfinib = SYMBOL("_kernel_mpfinib_table")$
-$FOREACH mpfid MPF.ID_LIST$
-	$mpf = PEEK(mpfinib + offsetof_MPFINIB_mpf, sizeof_void_ptr)$
-
-$	// åºå®é·ã¡ã¢ãªãã¼ã«é åã®å
-é ­çªå°ã®ãã§ãã¯ï¼»NGKI2249ï¼½
-	$IF CHECK_MPF_ALIGN && (mpf & (CHECK_MPF_ALIGN - 1)) != 0$
-		$ERROR MPF.TEXT_LINE[mpfid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-							"mpf", MPF.MPF[mpfid], mpfid, "CRE_MPF")$
-		$END$
-	$END$
-	$IF CHECK_MPF_NONNULL && mpf == 0$
-		$ERROR MPF.TEXT_LINE[mpfid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is null"),
-							"mpf", MPF.MPF[mpfid], mpfid, "CRE_MPF")$
-		$END$
-	$END$
-
-	$mpfinib = mpfinib + sizeof_MPFINIB$
-$END$
-
-$
-$  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã«é¢ãããã§ãã¯
-$
-$isrinib = SYMBOL("_kernel_isrinib_table")$
-$FOREACH order ISR.ORDER_LIST$
-	$isr = PEEK(isrinib + offsetof_ISRINIB_isr, sizeof_FP)$
-
-$	// å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã®å
-é ­çªå°ã®ãã§ãã¯ï¼»NGKI3004ï¼½
-	$IF CHECK_FUNC_ALIGN && (isr & (CHECK_FUNC_ALIGN - 1)) != 0$
-		$ERROR ISR.TEXT_LINE[order]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' in %4% is not aligned"),
-						"isr", ISR.ISR[order], "CRE_ISR")$
-		$END$
-	$END$
-	$IF CHECK_FUNC_NONNULL && isr == 0$
-		$ERROR ISR.TEXT_LINE[order]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' in %4% is null"),
-						"isr", ISR.ISR[order], "CRE_ISR")$
-		$END$
-	$END$
-
-	$isrinib = isrinib + sizeof_ISRINIB$
-$END$
-
-$ 
-$  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åã«é¢ãããã§ãã¯
-$ 
-$istk = PEEK(SYMBOL("_kernel_istk"), sizeof_void_ptr)$
-
-$ éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åã®å
-é ­çªå°ã®ãã§ãã¯ï¼»NGKI3222ï¼½
-$IF CHECK_STACK_ALIGN && (istk & (CHECK_STACK_ALIGN - 1)) != 0$
-	$ERROR ICS.TEXT_LINE[1]$E_PAR:$SPC$
-		$FORMAT(_("%1% `%2%\' in %3% is not aligned"),
-							"istk", ICS.ISTK[1], "DEF_ICS")$
-	$END$
-$END$
-$IF CHECK_STACK_NONNULL && istk == 0$
-	$ERROR ICS.TEXT_LINE[1]$E_PAR:$SPC$
-		$FORMAT(_("%1% `%2%\' in %3% is null"),
-							"istk", ICS.ISTK[1], "DEF_ICS")$
-	$END$
-$END$
-
-$ 
-$  ã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé åã«é¢ãããã§ãã¯
-$ 
-$kmm = PEEK(SYMBOL("_kernel_kmm"), sizeof_void_ptr)$
-
-$ ã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé åã®å
-é ­çªå°ã®ãã§ãã¯
-$IF CHECK_MB_ALIGN && (kmm & (CHECK_MB_ALIGN - 1)) != 0$
-	$ERROR KMM.TEXT_LINE[1]$E_PAR:$SPC$
-		$FORMAT(_("%1% `%2%\' in %3% is not aligned"),
-							"kmm", KMM.KMM[1], "DEF_KMM")$
-	$END$
-$END$
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_check.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_check.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_check.trb	(revision 306)
@@ -0,0 +1,374 @@
+# -*- coding: utf-8 -*-
+# 
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+#  
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: kernel_check.trb 662 2016-02-27 02:33:51Z ertl-hiro $
+#  
+
+#
+#		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹3ã®çæã¹ã¯ãªãã
+#
+
+# 
+#  ã¿ã¤ã ã¹ã¿ã³ããã¡ã¤ã«ã®æå®
+# 
+$timeStampFileName = "check.timestamp"
+
+#
+#  ãã¼ã¿ã»ã¯ã·ã§ã³ã®LMAããVMAã¸ã®ã³ãã¼
+#
+if !$lmaList.nil?
+  $lmaList.each do |lma|
+    startData = SYMBOL(lma[:START_DATA])
+    endData = SYMBOL(lma[:END_DATA])
+    startIdata = SYMBOL(lma[:START_IDATA])
+    if startData.nil?
+      error_exit("symbol `lma[:START_DATA]' not found")
+    elsif endData.nil?
+      error_exit("symbol `lma[:END_DATA]' not found")
+    elsif startIdata.nil?
+      error_exit("symbol `lma[:START_IDATA]' not found")
+    else
+      BCOPY(startIdata, startData, endData - startData)
+    end
+  end
+end
+
+#
+#  éç¥æ
+å ±ã®ãã§ãã¯é¢æ°
+#
+$tmax_tskid = $TMIN_TSKID + $cfgData[:CRE_TSK].size - 1
+$tmax_semid = $TMIN_SEMID + $cfgData[:CRE_SEM].size - 1
+$tmax_flgid = $TMIN_FLGID + $cfgData[:CRE_FLG].size - 1
+$tmax_dtqid = $TMIN_DTQID + $cfgData[:CRE_DTQ].size - 1
+
+def checkNotifyHandler(key, params, objid, exinf, nfyhdr)
+  # ãã©ã¡ã¼ã¿ãå¤æ°ã«æ ¼ç´
+  nfymode = params[:nfymode]
+  nfymode1 = nfymode & 0x0f
+  nfymode2 = nfymode & ~0x0f
+  par1 = params[:par1]
+  par2 = params[:par2]
+  funcname = "_kernel_nfyhdr_#{params[objid]}"
+
+  # éç¥å¦çã®ãã©ã¡ã¼ã¿æ°ã«ããè£æ­£å¦ç
+  if nfymode1 == $TNFY_SETVAR || nfymode1 == $TNFY_SETFLG \
+								|| nfymode1 == $TNFY_SNDDTQ
+    # éç¥å¦çã®ãã©ã¡ã¼ã¿ã2ã¤ã®å ´å
+    epar1 = params[:par3]
+    epar2 = params[:par4]
+  else
+    # éç¥å¦çã®ãã©ã¡ã¼ã¿ã1ã¤ã®å ´å
+    epar1 = params[:par2]
+    epar2 = params[:par3]
+  end
+
+  #	ã¿ã¤ã ã¤ãã³ããã³ãã©ã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI3693ï¼½
+  if nfymode == $TNFY_HANDLER
+    tmehdr = nfyhdr
+    params1 = params.dup
+    params1[:tmehdr] = par2
+    if (tmehdr & ($CHECK_FUNC_ALIGN - 1)) != 0
+      error_wrong_id("E_PAR", params1, :tmehdr, objid, "not aligned")
+    end
+    if $CHECK_FUNC_NONNULL && tmehdr == 0
+      error_wrong_id("E_PAR", params1, :tmehdr, objid, "null")
+    end
+  end
+
+  #	ã¤ãã³ãéç¥å¦çã®å¤æ°ã®çªå°ã¨ãªãã¸ã§ã¯ãIDã®ãã§ãã¯
+  if nfymode1 == $TNFY_SETVAR || nfymode1 == $TNFY_INCVAR
+    # å¤æ°ã®è¨­å®ï¼ã¤ã³ã¯ãªã¡ã³ãã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
+	p_var = exinf
+    params1 = params.dup
+    params1[:p_var] = par1
+
+    # å¤æ°ã®çªå°ã®ãã§ãã¯ï¼»NGKI3699ï¼½ï¼»NGKI3897ï¼½
+    if (p_var & ($CHECK_INTPTR_ALIGN - 1)) != 0
+      error_wrong_id("E_PAR", params1, :p_var, objid, "not aligned")
+    end
+    if $CHECK_INTPTR_NONNULL && p_var == 0
+      error_wrong_id("E_PAR", params1, :p_var, objid, "null")
+    end
+  elsif (nfymode1 == $TNFY_ACTTSK || nfymode1 == $TNFY_WUPTSK)
+    # ã¿ã¹ã¯ã®èµ·åï¼èµ·åºã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
+    tskid = exinf
+    params1 = params.dup
+    params1[:tskid] = par1
+
+    # ã¿ã¹ã¯IDã®ãã§ãã¯ï¼»NGKI3704ï¼½
+    if !($TMIN_TSKID <= tskid && tskid <= $tmax_tskid)
+      error_illegal_id("E_ID", params1, :tskid, objid)
+    end
+  elsif nfymode1 == $TNFY_SIGSEM
+    # ã»ããã©ã®è³æºã®è¿å´ã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
+    semid = exinf
+    params1 = params.dup
+    params1[:semid] = par1
+
+    # ã»ããã©IDã®ãã§ãã¯ï¼»NGKI3707ï¼½
+    if !($TMIN_SEMID <= semid && semid <= $tmax_semid)
+      error_illegal_id("E_ID", params1, :semid, objid)
+    end
+  elsif nfymode1 == $TNFY_SETFLG
+    # ã¤ãã³ããã©ã°ã®ã»ããã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
+    flgid = exinf
+    params1 = params.dup
+    params1[:flgid] = par1
+
+    # ã¤ãã³ããã©ã°IDã®ãã§ãã¯ï¼»NGKI3710ï¼½
+    if !($TMIN_FLGID <= flgid && flgid <= $tmax_flgid)
+      error_illegal_id("E_ID", params1, :flgid, objid)
+    end
+  elsif nfymode1 == $TNFY_SNDDTQ
+    # ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
+    dtqid = exinf
+    params1 = params.dup
+    params1[:dtqid] = par1
+
+    # ãã¼ã¿ã­ã¥ã¼IDã®ãã§ãã¯ï¼»NGKI3713ï¼½
+    if !($TMIN_DTQID <= dtqid && dtqid <= $tmax_dtqid)
+      error_illegal_id("E_ID", params1, :dtqid, objid)
+    end
+  end
+
+  # ã¨ã©ã¼éç¥å¦çã®å¤æ°ã®çªå°ã¨ãªãã¸ã§ã¯ãIDã®ãã§ãã¯
+  if (nfymode2 == $TENFY_SETVAR || nfymode2 == $TENFY_INCVAR)
+    # å¤æ°ã®è¨­å®ï¼ã¤ã³ã¯ãªã¡ã³ãã«ããã¨ã©ã¼ã®éç¥
+    p_var = PEEK(SYMBOL(funcname + "_p_evar"), $sizeof_intptr_t)
+    params1 = params.dup
+    params1[:p_var] = epar1
+
+    # å¤æ°ã®çªå°ã®ãã§ãã¯ï¼»NGKI3701ï¼½ï¼»NGKI3897ï¼½
+    if (p_var & ($CHECK_INTPTR_ALIGN - 1)) != 0
+      error_wrong_id("E_PAR", params1, :p_var, objid, "not aligned")
+    end
+    if $CHECK_INTPTR_NONNULL && p_var == 0
+      error_wrong_id("E_PAR", params1, :p_var, objid, "null")
+    end
+  elsif nfymode2 == $TENFY_ACTTSK || nfymode2 == $TENFY_WUPTSK
+    # ã¿ã¹ã¯ã®èµ·åï¼èµ·åºã«ããã¨ã©ã¼ã®éç¥
+    tskid = PEEK(SYMBOL(funcname + "_etskid"), $sizeof_ID)
+    params1 = params.dup
+    params1[:tskid] = epar1
+
+    # ã¿ã¹ã¯IDã®ãã§ãã¯ï¼»NGKI3704ï¼½
+    if !($TMIN_TSKID <= tskid && tskid <= $tmax_tskid)
+      error_illegal_id("E_ID", params1, :tskid, objid)
+    end
+  elsif nfymode2 == $TENFY_SIGSEM
+    # ã»ããã©ã®è³æºã®è¿å´ã«ããã¨ã©ã¼ã®éç¥
+	semid = PEEK(SYMBOL(funcname + "_esemid"), $sizeof_ID)
+    params1 = params.dup
+    params1[:semid] = epar1
+
+    # ã»ããã©IDã®ãã§ãã¯ï¼»NGKI3707ï¼½
+    if !($TMIN_SEMID <= semid && semid <= $tmax_semid)
+      error_illegal_id("E_ID", params1, :semid, objid)
+    end
+  elsif nfymode2 == $TENFY_SETFLG
+    # ã¤ãã³ããã©ã°ã®ã»ããã«ããã¨ã©ã¼ã®éç¥
+    flgid = PEEK(SYMBOL(funcname + "_eflgid"), $sizeof_ID)
+    params1 = params.dup
+    params1[:flgid] = epar1
+
+    # ã¤ãã³ããã©ã°IDã®ãã§ãã¯ï¼»NGKI3710ï¼½
+    if !($TMIN_FLGID <= flgid && flgid <= $tmax_flgid)
+      error_illegal_id("E_ID", params1, :flgid, objid)
+    end
+  elsif nfymode2 == $TENFY_SNDDTQ
+    # ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããã¨ã©ã¼ã®éç¥
+    dtqid = PEEK(SYMBOL(funcname + "_edtqid"), $sizeof_ID)
+    params1 = params.dup
+    params1[:dtqid] = epar1
+
+    # ãã¼ã¿ã­ã¥ã¼IDã®ãã§ãã¯ï¼»NGKI3715ï¼½
+    if !($TMIN_DTQID <= dtqid && dtqid <= $tmax_dtqid)
+      error_illegal_id("E_ID", params1, :dtqid, objid)
+    end
+  end
+end
+
+# 
+#  ã¿ã¹ã¯ã«é¢ãããã§ãã¯
+# 
+tinib = SYMBOL("_kernel_tinib_table")
+$cfgData[:CRE_TSK].sort.each do |key, params|
+  task = PEEK(tinib + $offsetof_TINIB_task, $sizeof_TASK)
+
+  # ã¿ã¹ã¯ã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI1033ï¼½
+  if (task & ($CHECK_FUNC_ALIGN - 1)) != 0
+    error_wrong_id("E_PAR", params, :task, :tskid, "not aligned")
+  end
+  if $CHECK_FUNC_NONNULL && task == 0
+    error_wrong_id("E_PAR", params, :task, :tskid, "null")
+  end
+
+  # ã¿ã¹ã¯ã®ã¹ã¿ãã¯é åã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI1056ï¼½
+  if $USE_TSKINICTXB
+    stk = GetStackTskinictxb(key, params, tinib)
+  else
+    stk = PEEK(tinib + $offsetof_TINIB_stk, $sizeof_void_ptr)
+  end
+  if (stk & ($CHECK_STACK_ALIGN - 1)) != 0
+    error_wrong_id("E_PAR", params, :stk, :tskid, "not aligned")
+  end
+  if $CHECK_STACK_NONNULL && stk == 0
+    error_wrong_id("E_PAR", params, :stk, :tskid, "null")
+  end
+
+  tinib += $sizeof_TINIB
+end
+
+# 
+#  åºå®é·ã¡ã¢ãªãã¼ã«ã«é¢ãããã§ãã¯
+# 
+mpfinib = SYMBOL("_kernel_mpfinib_table")
+$cfgData[:CRE_MPF].sort.each do |key, params|
+  mpf = PEEK(mpfinib + $offsetof_MPFINIB_mpf, $sizeof_void_ptr)
+
+  # åºå®é·ã¡ã¢ãªãã¼ã«é åã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI2249ï¼½
+  if (mpf & ($CHECK_MPF_ALIGN - 1)) != 0
+    error_wrong_id("E_PAR", params, :mpf, :mpfid, "not aligned")
+  end
+  if $CHECK_MPF_NONNULL && mpf == 0
+    error_wrong_id("E_PAR", params, :mpf, :mpfid, "null")
+  end
+
+  mpfinib += $sizeof_MPFINIB
+end
+
+# 
+#  å¨æéç¥ã«é¢ãããã§ãã¯
+# 
+cycinib = SYMBOL("_kernel_cycinib_table")
+$cfgData[:CRE_CYC].sort.each do |key, params|
+  exinf = PEEK(cycinib + $offsetof_CYCINIB_exinf, $sizeof_intptr_t)
+  nfyhdr = PEEK(cycinib + $offsetof_CYCINIB_nfyhdr, $sizeof_NFYHDR)
+
+  #	éç¥æ
+å ±ã®ãã§ãã¯
+  checkNotifyHandler(key, params, :cycid, exinf, nfyhdr)
+
+  cycinib += $sizeof_CYCINIB
+end
+
+# 
+#  ã¢ã©ã¼ã éç¥ã«é¢ãããã§ãã¯
+# 
+alminib = SYMBOL("_kernel_alminib_table")
+$cfgData[:CRE_ALM].sort.each do |key, params|
+  exinf = PEEK(alminib + $offsetof_ALMINIB_exinf, $sizeof_intptr_t)
+  nfyhdr = PEEK(alminib + $offsetof_ALMINIB_nfyhdr, $sizeof_NFYHDR)
+
+  #	éç¥æ
+å ±ã®ãã§ãã¯
+  checkNotifyHandler(key, params, :almid, exinf, nfyhdr)
+
+  alminib += $sizeof_ALMINIB
+end
+
+#
+#  å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã«é¢ãããã§ãã¯
+#
+isrinib = SYMBOL("_kernel_isrinib_table")
+$cfgData[:CRE_ISR].sort.each do |key, params|
+  isr = PEEK(isrinib + $offsetof_ISRINIB_isr, $sizeof_ISR)
+
+  # å²è¾¼ã¿ãµã¼ãã¹ã«ã¼ãã³ã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI3004ï¼½
+  if (isr & ($CHECK_FUNC_ALIGN - 1)) != 0
+    error_wrong_id("E_PAR", params, :isr, :isrid, "not aligned")
+  end
+  if $CHECK_FUNC_NONNULL && isr == 0
+    error_wrong_id("E_PAR", params, :isr, :isrid, "null")
+  end
+
+  isrinib += $sizeof_ISRINIB
+end
+
+# 
+#  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åã«é¢ãããã§ãã¯
+# 
+istkAddr = SYMBOL("_kernel_istk")
+if !istkAddr.nil?
+  istk = PEEK(istkAddr, $sizeof_void_ptr)
+
+  # éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI3222ï¼½
+  if (istk & ($CHECK_STACK_ALIGN - 1)) != 0
+    error_wrong("E_PAR", $cfgData[:DEF_ICS][1], :istk, "not aligned")
+  end
+  if $CHECK_STACK_NONNULL && istk == 0
+    error_wrong("E_PAR", $cfgData[:DEF_ICS][1], :istk, "null")
+  end
+end
+
+# 
+#  ã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé åã«é¢ãããã§ãã¯
+# 
+kmmAddr = SYMBOL("_kernel_kmm")
+if !kmmAddr.nil?
+  kmm = PEEK(kmmAddr, $sizeof_void_ptr)
+
+  # ã«ã¼ãã«ãå²ãä»ããã¡ã¢ãªé åã®å
+é ­çªå°ã®ãã§ãã¯
+  if (kmm & ($CHECK_MB_ALIGN - 1)) != 0
+    error_wrong("E_PAR", $cfgData[:DEF_KMM][1], :kmm, "not aligned")
+  end
+end
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_def.csv
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_def.csv	(revision 302)
+++ 	(revision )
@@ -1,140 +1,0 @@
-SIL_ENDIAN_BIG,#defined(SIL_ENDIAN_BIG)
-SIL_ENDIAN_LITTLE,#defined(SIL_ENDIAN_LITTLE)
-TA_NULL,TA_NULL
-TA_ACT,TA_ACT
-TA_NOACTQUE,TA_NOACTQUE
-TA_TPRI,TA_TPRI
-TA_WMUL,TA_WMUL
-TA_CLR,TA_CLR
-TA_CEILING,TA_CEILING
-TA_STA,TA_STA
-TA_NONKERNEL,TA_NONKERNEL
-TA_ENAINT,TA_ENAINT
-TA_EDGE,TA_EDGE
-TNFY_HANDLER,TNFY_HANDLER
-TNFY_SETVAR,TNFY_SETVAR
-TNFY_INCVAR,TNFY_INCVAR
-TNFY_ACTTSK,TNFY_ACTTSK
-TNFY_WUPTSK,TNFY_WUPTSK
-TNFY_SIGSEM,TNFY_SIGSEM
-TNFY_SETFLG,TNFY_SETFLG
-TNFY_SNDDTQ,TNFY_SNDDTQ
-TENFY_SETVAR,TENFY_SETVAR
-TENFY_INCVAR,TENFY_INCVAR
-TENFY_ACTTSK,TENFY_ACTTSK
-TENFY_WUPTSK,TENFY_WUPTSK
-TENFY_SIGSEM,TENFY_SIGSEM
-TENFY_SETFLG,TENFY_SETFLG
-TENFY_SNDDTQ,TENFY_SNDDTQ
-TMIN_TPRI,TMIN_TPRI,signed
-TMAX_TPRI,TMAX_TPRI,signed
-TMIN_DPRI,TMIN_DPRI,signed
-TMAX_DPRI,TMAX_DPRI,signed
-TMIN_ISRPRI,TMIN_ISRPRI,signed
-TMAX_ISRPRI,TMAX_ISRPRI,signed
-TBIT_FLGPTN,TBIT_FLGPTN
-TMAX_MAXSEM,TMAX_MAXSEM
-TMAX_RELTIM,TMAX_RELTIM
-TMIN_INTPRI,TMIN_INTPRI,signed
-TMAX_INTPRI,TMAX_INTPRI,signed
-TMIN_TSKID,TMIN_TSKID,signed
-TMIN_SEMID,TMIN_SEMID,signed
-TMIN_FLGID,TMIN_FLGID,signed
-TMIN_DTQID,TMIN_DTQID,signed
-TMIN_PDQID,TMIN_PDQID,signed
-TMIN_MTXID,TMIN_MTXID,signed
-TMIN_MPFID,TMIN_MPFID,signed
-TMIN_CYCID,TMIN_CYCID,signed
-TMIN_ALMID,TMIN_ALMID,signed
-OMIT_INITIALIZE_INTERRUPT,#defined(OMIT_INITIALIZE_INTERRUPT)
-USE_INHINIB_TABLE,#defined(USE_INHINIB_TABLE)
-USE_INTINIB_TABLE,#defined(USE_INTINIB_TABLE)
-OMIT_INITIALIZE_EXCEPTION,#defined(OMIT_INITIALIZE_EXCEPTION)
-USE_TSKINICTXB,#defined(USE_TSKINICTXB)
-TARGET_TSKATR,#defined(TARGET_TSKATR),,TARGET_TSKATR
-TARGET_INTATR,#defined(TARGET_INTATR),,TARGET_INTATR
-TARGET_INHATR,#defined(TARGET_INHATR),,TARGET_INHATR
-TARGET_ISRATR,#defined(TARGET_ISRATR),,TARGET_ISRATR
-TARGET_EXCATR,#defined(TARGET_EXCATR),,TARGET_EXCATR
-TARGET_MIN_STKSZ,#defined(TARGET_MIN_STKSZ),,TARGET_MIN_STKSZ
-TARGET_MIN_ISTKSZ,#defined(TARGET_MIN_ISTKSZ),,TARGET_MIN_ISTKSZ
-CHECK_STKSZ_ALIGN,#defined(CHECK_STKSZ_ALIGN),,CHECK_STKSZ_ALIGN
-CHECK_INTPTR_ALIGN,#defined(CHECK_INTPTR_ALIGN),,CHECK_INTPTR_ALIGN
-CHECK_INTPTR_NONNULL,#defined(CHECK_INTPTR_NONNULL)
-CHECK_FUNC_ALIGN,#defined(CHECK_FUNC_ALIGN),,CHECK_FUNC_ALIGN
-CHECK_FUNC_NONNULL,#defined(CHECK_FUNC_NONNULL)
-CHECK_STACK_ALIGN,#defined(CHECK_STACK_ALIGN),,CHECK_STACK_ALIGN
-CHECK_STACK_NONNULL,#defined(CHECK_STACK_NONNULL)
-CHECK_MPF_ALIGN,#defined(CHECK_MPF_ALIGN),,CHECK_MPF_ALIGN
-CHECK_MPF_NONNULL,#defined(CHECK_MPF_NONNULL)
-CHECK_MB_ALIGN,#defined(CHECK_MB_ALIGN),,CHECK_MB_ALIGN
-sizeof_void_ptr,sizeof(void*)
-sizeof_uint_t,sizeof(uint_t)
-sizeof_size_t,sizeof(size_t)
-sizeof_intptr_t,sizeof(intptr_t)
-sizeof_ID,sizeof(ID)
-sizeof_FP,sizeof(FP)
-sizeof_INHNO,sizeof(INHNO)
-sizeof_INTNO,sizeof(INTNO)
-sizeof_EXCNO,sizeof(EXCNO)
-sizeof_TINIB,sizeof(TINIB)
-offsetof_TINIB_tskatr,"offsetof(TINIB,tskatr)"
-offsetof_TINIB_exinf,"offsetof(TINIB,exinf)"
-offsetof_TINIB_task,"offsetof(TINIB,task)"
-offsetof_TINIB_ipriority,"offsetof(TINIB,ipriority)"
-offsetof_TINIB_stksz,#!defined(USE_TSKINICTXB),,"offsetof(TINIB,stksz)"
-offsetof_TINIB_stk,#!defined(USE_TSKINICTXB),,"offsetof(TINIB,stk)"
-sizeof_SEMINIB,sizeof(SEMINIB)
-offsetof_SEMINIB_sematr,"offsetof(SEMINIB,sematr)"
-offsetof_SEMINIB_isemcnt,"offsetof(SEMINIB,isemcnt)"
-offsetof_SEMINIB_maxsem,"offsetof(SEMINIB,maxsem)"
-sizeof_FLGPTN,sizeof(FLGPTN)
-sizeof_FLGINIB,sizeof(FLGINIB)
-offsetof_FLGINIB_flgatr,"offsetof(FLGINIB,flgatr)"
-offsetof_FLGINIB_iflgptn,"offsetof(FLGINIB,iflgptn)"
-sizeof_DTQINIB,sizeof(DTQINIB)
-offsetof_DTQINIB_dtqatr,"offsetof(DTQINIB,dtqatr)"
-offsetof_DTQINIB_dtqcnt,"offsetof(DTQINIB,dtqcnt)"
-offsetof_DTQINIB_p_dtqmb,"offsetof(DTQINIB,p_dtqmb)"
-sizeof_PDQINIB,sizeof(PDQINIB)
-offsetof_PDQINIB_pdqatr,"offsetof(PDQINIB,pdqatr)"
-offsetof_PDQINIB_pdqcnt,"offsetof(PDQINIB,pdqcnt)"
-offsetof_PDQINIB_maxdpri,"offsetof(PDQINIB,maxdpri)"
-offsetof_PDQINIB_p_pdqmb,"offsetof(PDQINIB,p_pdqmb)"
-sizeof_MTXINIB,sizeof(MTXINIB)
-offsetof_MTXINIB_mtxatr,"offsetof(MTXINIB,mtxatr)"
-offsetof_MTXINIB_ceilpri,"offsetof(MTXINIB,ceilpri)"
-sizeof_MPFINIB,sizeof(MPFINIB)
-offsetof_MPFINIB_mpfatr,"offsetof(MPFINIB,mpfatr)"
-offsetof_MPFINIB_blkcnt,"offsetof(MPFINIB,blkcnt)"
-offsetof_MPFINIB_blksz,"offsetof(MPFINIB,blksz)"
-offsetof_MPFINIB_mpf,"offsetof(MPFINIB,mpf)"
-offsetof_MPFINIB_p_mpfmb,"offsetof(MPFINIB,p_mpfmb)"
-sizeof_CYCINIB,sizeof(CYCINIB)
-offsetof_CYCINIB_cycatr,"offsetof(CYCINIB,cycatr)"
-offsetof_CYCINIB_exinf,"offsetof(CYCINIB,exinf)"
-offsetof_CYCINIB_nfyhdr,"offsetof(CYCINIB,nfyhdr)"
-offsetof_CYCINIB_cyctim,"offsetof(CYCINIB,cyctim)"
-offsetof_CYCINIB_cycphs,"offsetof(CYCINIB,cycphs)"
-sizeof_ALMINIB,sizeof(ALMINIB)
-offsetof_ALMINIB_almatr,"offsetof(ALMINIB,almatr)"
-offsetof_ALMINIB_exinf,"offsetof(ALMINIB,exinf)"
-offsetof_ALMINIB_nfyhdr,"offsetof(ALMINIB,nfyhdr)"
-sizeof_ISRINIB,sizeof(ISRINIB)
-offsetof_ISRINIB_isratr,"offsetof(ISRINIB,isratr)"
-offsetof_ISRINIB_exinf,"offsetof(ISRINIB,exinf)"
-offsetof_ISRINIB_p_isr_queue,"offsetof(ISRINIB,p_isr_queue)"
-offsetof_ISRINIB_isr,"offsetof(ISRINIB,isr)"
-offsetof_ISRINIB_isrpri,"offsetof(ISRINIB,isrpri)"
-sizeof_INHINIB,#!defined(OMIT_INITIALIZE_INTERRUPT),,sizeof(INHINIB)
-offset_INHINIB_inhno,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INHINIB,inhno)"
-offset_INHINIB_inhatr,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INHINIB,inhatr)"
-offset_INHINIB_int_entry,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INHINIB,int_entry)"
-sizeof_INTINIB,#!defined(OMIT_INITIALIZE_INTERRUPT),,sizeof(INTINIB)
-offset_INTINIB_intno,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INTINIB,intno)"
-offset_INTINIB_intatr,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INTINIB,intatr)"
-offset_INTINIB_intpri,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INTINIB,intpri)"
-sizeof_EXCINIB,#!defined(OMIT_INITIALIZE_EXCEPTION),,sizeof(EXCINIB)
-offset_EXCINIB_excno,#!defined(OMIT_INITIALIZE_EXCEPTION),,"offsetof(EXCINIB,excno)"
-offset_EXCINIB_excatr,#!defined(OMIT_INITIALIZE_EXCEPTION),,"offsetof(EXCINIB,excatr)"
-offset_EXCINIB_exc_entry,#!defined(OMIT_INITIALIZE_EXCEPTION),,"offsetof(EXCINIB,exc_entry)"
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_impl.h
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_impl.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_impl.h	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2004-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2004-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: kernel_impl.h 333 2015-06-21 13:23:37Z ertl-hiro $
+ *  $Id: kernel_impl.h 748 2016-05-14 14:30:06Z ertl-hiro $
  */
 
@@ -88,11 +88,4 @@
  */
 #include <t_syslog.h>
-
-/*
- *  åã­ã£ã¹ããè¡ããã¯ã­ã®å®ç¾©
- */
-#ifndef CAST
-#define CAST(type, val)		((type)(val))
-#endif /* CAST */
 
 /*
@@ -189,4 +182,9 @@
 
 /*
+ *  TECSã®åæåï¼init_tecs.cï¼
+ */
+extern void initialize_tecs(void);
+
+/*
  *  åã¢ã¸ã¥ã¼ã«ã®åæåï¼kernel_cfg.cï¼
  */
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_rename.def
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_rename.def	(revision 302)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_rename.def	(revision 306)
@@ -181,4 +181,5 @@
 isrinib_table
 aisrinib_table
+isrorder_table
 isrcb_table
 tnum_def_inhno
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_rename.h
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_rename.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_rename.h	(revision 306)
@@ -220,4 +220,5 @@
 #define isrinib_table				_kernel_isrinib_table
 #define aisrinib_table				_kernel_aisrinib_table
+#define isrorder_table				_kernel_isrorder_table
 #define isrcb_table					_kernel_isrcb_table
 #define tnum_def_inhno				_kernel_tnum_def_inhno
@@ -235,239 +236,4 @@
 
 
-#ifdef TOPPERS_LABEL_ASM
-
-/*
- *  startup.c
- */
-#define _kerflg						__kernel_kerflg
-#define _exit_kernel				__kernel_exit_kernel
-#define _initialize_kmm				__kernel_initialize_kmm
-#define _kernel_malloc				__kernel_kernel_malloc
-#define _kernel_free				__kernel_kernel_free
-
-/*
- *  task.c
- */
-#define _p_runtsk					__kernel_p_runtsk
-#define _p_schedtsk					__kernel_p_schedtsk
-#define _enadsp						__kernel_enadsp
-#define _dspflg						__kernel_dspflg
-#define _ready_queue				__kernel_ready_queue
-#define _ready_primap				__kernel_ready_primap
-#define _free_tcb					__kernel_free_tcb
-#define _initialize_task			__kernel_initialize_task
-#define _search_schedtsk			__kernel_search_schedtsk
-#define _make_runnable				__kernel_make_runnable
-#define _make_non_runnable			__kernel_make_non_runnable
-#define _make_dormant				__kernel_make_dormant
-#define _make_active				__kernel_make_active
-#define _change_priority			__kernel_change_priority
-#define _rotate_ready_queue			__kernel_rotate_ready_queue
-#define _task_terminate				__kernel_task_terminate
-
-/*
- *  taskhook.c
- */
-#define _mtxhook_check_ceilpri		__kernel_mtxhook_check_ceilpri
-#define _mtxhook_scan_ceilmtx		__kernel_mtxhook_scan_ceilmtx
-#define _mtxhook_release_all		__kernel_mtxhook_release_all
-
-/*
- *  wait.c
- */
-#define _make_wait_tmout			__kernel_make_wait_tmout
-#define _wait_complete				__kernel_wait_complete
-#define _wait_tmout					__kernel_wait_tmout
-#define _wait_tmout_ok				__kernel_wait_tmout_ok
-#define _wobj_make_wait				__kernel_wobj_make_wait
-#define _wobj_make_wait_tmout		__kernel_wobj_make_wait_tmout
-#define _init_wait_queue			__kernel_init_wait_queue
-
-/*
- *  time_event.c
- */
-#define _boundary_evttim			__kernel_boundary_evttim
-#define _current_evttim				__kernel_current_evttim
-#define _current_hrtcnt				__kernel_current_hrtcnt
-#define _monotonic_evttim			__kernel_monotonic_evttim
-#define _systim_offset				__kernel_systim_offset
-#define _in_signal_time				__kernel_in_signal_time
-#define _initialize_tmevt			__kernel_initialize_tmevt
-#define _tmevt_up					__kernel_tmevt_up
-#define _tmevt_down					__kernel_tmevt_down
-#define _update_current_evttim		__kernel_update_current_evttim
-#define _set_hrt_event				__kernel_set_hrt_event
-#define _tmevtb_register			__kernel_tmevtb_register
-#define _tmevtb_enqueue				__kernel_tmevtb_enqueue
-#define _tmevtb_dequeue				__kernel_tmevtb_dequeue
-#define _check_adjtim				__kernel_check_adjtim
-#define _tmevt_lefttim				__kernel_tmevt_lefttim
-#define _signal_time				__kernel_signal_time
-
-/*
- *  semaphore.c
- */
-#define _free_semcb					__kernel_free_semcb
-#define _initialize_semaphore		__kernel_initialize_semaphore
-
-/*
- *  eventflag.c
- */
-#define _free_flgcb					__kernel_free_flgcb
-#define _initialize_eventflag		__kernel_initialize_eventflag
-#define _check_flg_cond				__kernel_check_flg_cond
-
-/*
- *  dataqueue.c
- */
-#define _free_dtqcb					__kernel_free_dtqcb
-#define _initialize_dataqueue		__kernel_initialize_dataqueue
-#define _enqueue_data				__kernel_enqueue_data
-#define _force_enqueue_data			__kernel_force_enqueue_data
-#define _dequeue_data				__kernel_dequeue_data
-#define _send_data					__kernel_send_data
-#define _force_send_data			__kernel_force_send_data
-#define _receive_data				__kernel_receive_data
-
-/*
- *  pridataq.c
- */
-#define _free_pdqcb					__kernel_free_pdqcb
-#define _initialize_pridataq		__kernel_initialize_pridataq
-#define _enqueue_pridata			__kernel_enqueue_pridata
-#define _dequeue_pridata			__kernel_dequeue_pridata
-#define _send_pridata				__kernel_send_pridata
-#define _receive_pridata			__kernel_receive_pridata
-
-/*
- *  mutex.c
- */
-#define _free_mtxcb					__kernel_free_mtxcb
-#define _initialize_mutex			__kernel_initialize_mutex
-#define _mutex_check_ceilpri		__kernel_mutex_check_ceilpri
-#define _mutex_scan_ceilmtx			__kernel_mutex_scan_ceilmtx
-#define _mutex_drop_priority		__kernel_mutex_drop_priority
-#define _mutex_acquire				__kernel_mutex_acquire
-#define _mutex_release				__kernel_mutex_release
-#define _mutex_release_all			__kernel_mutex_release_all
-
-/*
- *  mempfix.c
- */
-#define _free_mpfcb					__kernel_free_mpfcb
-#define _initialize_mempfix			__kernel_initialize_mempfix
-#define _get_mpf_block				__kernel_get_mpf_block
-
-/*
- *  time_manage.c
- */
-#define _check_nfyinfo				__kernel_check_nfyinfo
-#define _notify_handler				__kernel_notify_handler
-
-/*
- *  cyclic.c
- */
-#define _free_cyccb					__kernel_free_cyccb
-#define _initialize_cyclic			__kernel_initialize_cyclic
-#define _call_cyclic				__kernel_call_cyclic
-
-/*
- *  alarm.c
- */
-#define _free_almcb					__kernel_free_almcb
-#define _initialize_alarm			__kernel_initialize_alarm
-#define _call_alarm					__kernel_call_alarm
-
-/*
- *  interrupt.c
- */
-#define _free_isrcb					__kernel_free_isrcb
-#define _initialize_isr				__kernel_initialize_isr
-#define _call_isr					__kernel_call_isr
-#define _initialize_interrupt		__kernel_initialize_interrupt
-
-/*
- *  exception.c
- */
-#define _initialize_exception		__kernel_initialize_exception
-
-/*
- *  kernel_cfg.c
- */
-#define _initialize_object			__kernel_initialize_object
-#define _call_inirtn				__kernel_call_inirtn
-#define _call_terrtn				__kernel_call_terrtn
-#define _tmax_tskid					__kernel_tmax_tskid
-#define _tmax_stskid				__kernel_tmax_stskid
-#define _tinib_table				__kernel_tinib_table
-#define _atinib_table				__kernel_atinib_table
-#define _torder_table				__kernel_torder_table
-#define _tcb_table					__kernel_tcb_table
-#define _tmax_semid					__kernel_tmax_semid
-#define _tmax_ssemid				__kernel_tmax_ssemid
-#define _seminib_table				__kernel_seminib_table
-#define _aseminib_table				__kernel_aseminib_table
-#define _semcb_table				__kernel_semcb_table
-#define _tmax_flgid					__kernel_tmax_flgid
-#define _tmax_sflgid				__kernel_tmax_sflgid
-#define _flginib_table				__kernel_flginib_table
-#define _aflginib_table				__kernel_aflginib_table
-#define _flgcb_table				__kernel_flgcb_table
-#define _tmax_dtqid					__kernel_tmax_dtqid
-#define _tmax_sdtqid				__kernel_tmax_sdtqid
-#define _dtqinib_table				__kernel_dtqinib_table
-#define _adtqinib_table				__kernel_adtqinib_table
-#define _dtqcb_table				__kernel_dtqcb_table
-#define _tmax_pdqid					__kernel_tmax_pdqid
-#define _tmax_spdqid				__kernel_tmax_spdqid
-#define _pdqinib_table				__kernel_pdqinib_table
-#define _apdqinib_table				__kernel_apdqinib_table
-#define _pdqcb_table				__kernel_pdqcb_table
-#define _tmax_mtxid					__kernel_tmax_mtxid
-#define _tmax_smtxid				__kernel_tmax_smtxid
-#define _mtxinib_table				__kernel_mtxinib_table
-#define _amtxinib_table				__kernel_amtxinib_table
-#define _mtxcb_table				__kernel_mtxcb_table
-#define _tmax_mpfid					__kernel_tmax_mpfid
-#define _tmax_smpfid				__kernel_tmax_smpfid
-#define _mpfinib_table				__kernel_mpfinib_table
-#define _ampfinib_table				__kernel_ampfinib_table
-#define _mpfcb_table				__kernel_mpfcb_table
-#define _tmax_cycid					__kernel_tmax_cycid
-#define _tmax_scycid				__kernel_tmax_scycid
-#define _cycinib_table				__kernel_cycinib_table
-#define _acycinib_table				__kernel_acycinib_table
-#define _acyc_nfyinfo_table			__kernel_acyc_nfyinfo_table
-#define _cyccb_table				__kernel_cyccb_table
-#define _tmax_almid					__kernel_tmax_almid
-#define _tmax_salmid				__kernel_tmax_salmid
-#define _alminib_table				__kernel_alminib_table
-#define _aalminib_table				__kernel_aalminib_table
-#define _aalm_nfyinfo_table			__kernel_aalm_nfyinfo_table
-#define _almcb_table				__kernel_almcb_table
-#define _tnum_isr_queue				__kernel_tnum_isr_queue
-#define _isr_queue_list				__kernel_isr_queue_list
-#define _isr_queue_table			__kernel_isr_queue_table
-#define _tmax_isrid					__kernel_tmax_isrid
-#define _tmax_sisrid				__kernel_tmax_sisrid
-#define _isrinib_table				__kernel_isrinib_table
-#define _aisrinib_table				__kernel_aisrinib_table
-#define _isrcb_table				__kernel_isrcb_table
-#define _tnum_def_inhno				__kernel_tnum_def_inhno
-#define _inhinib_table				__kernel_inhinib_table
-#define _tnum_cfg_intno				__kernel_tnum_cfg_intno
-#define _intinib_table				__kernel_intinib_table
-#define _tnum_def_excno				__kernel_tnum_def_excno
-#define _excinib_table				__kernel_excinib_table
-#define _tmevt_heap					__kernel_tmevt_heap
-#define _istksz						__kernel_istksz
-#define _istk						__kernel_istk
-#define _istkpt						__kernel_istkpt
-#define _kmmsz						__kernel_kmmsz
-#define _kmm						__kernel_kmm
-
-
-#endif /* TOPPERS_LABEL_ASM */
-
 #include "target_rename.h"
 
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_sym.def
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_sym.def	(revision 306)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_sym.def	(revision 306)
@@ -0,0 +1,150 @@
+USE_EXTERNAL_ID,true,bool,defined(USE_EXTERNAL_ID)
+SIL_ENDIAN_BIG,true,bool,defined(SIL_ENDIAN_BIG)
+SIL_ENDIAN_LITTLE,true,bool,defined(SIL_ENDIAN_LITTLE)
+TA_NULL
+TA_ACT
+TA_NOACTQUE
+TA_TPRI
+TA_WMUL
+TA_CLR
+TA_CEILING
+TA_STA
+TA_NONKERNEL
+TA_ENAINT
+TA_EDGE
+TNFY_HANDLER
+TNFY_SETVAR
+TNFY_INCVAR
+TNFY_ACTTSK
+TNFY_WUPTSK
+TNFY_SIGSEM
+TNFY_SETFLG
+TNFY_SNDDTQ
+TENFY_SETVAR
+TENFY_INCVAR
+TENFY_ACTTSK
+TENFY_WUPTSK
+TENFY_SIGSEM
+TENFY_SETFLG
+TENFY_SNDDTQ
+TMIN_TPRI,,signed
+TMAX_TPRI,,signed
+TMIN_DPRI,,signed
+TMAX_DPRI,,signed
+TMIN_ISRPRI,,signed
+TMAX_ISRPRI,,signed
+TBIT_FLGPTN
+TMAX_MAXSEM
+TMAX_RELTIM
+TMIN_INTPRI,,signed
+TMAX_INTPRI,,signed
+TMIN_TSKID,,signed
+TMIN_SEMID,,signed
+TMIN_FLGID,,signed
+TMIN_DTQID,,signed
+TMIN_PDQID,,signed
+TMIN_MTXID,,signed
+TMIN_MPFID,,signed
+TMIN_CYCID,,signed
+TMIN_ALMID,,signed
+USE_TSKINICTXB,true,bool,defined(USE_TSKINICTXB)
+OMIT_INITIALIZE_INTERRUPT,true,bool,defined(OMIT_INITIALIZE_INTERRUPT)
+USE_INHINIB_TABLE,true,bool,defined(USE_INHINIB_TABLE)
+USE_INTINIB_TABLE,true,bool,defined(USE_INTINIB_TABLE)
+OMIT_INITIALIZE_EXCEPTION,true,bool,defined(OMIT_INITIALIZE_EXCEPTION)
+DEFAULT_ISTK,,,defined(DEFAULT_ISTK)
+TARGET_TSKATR,,,defined(TARGET_TSKATR),0
+TARGET_INTATR,,,defined(TARGET_INTATR),0
+TARGET_INHATR,,,defined(TARGET_INHATR),0
+TARGET_ISRATR,,,defined(TARGET_ISRATR),0
+TARGET_EXCATR,,,defined(TARGET_EXCATR),0
+TARGET_MIN_STKSZ,,,defined(TARGET_MIN_STKSZ),1
+TARGET_MIN_ISTKSZ,,,defined(TARGET_MIN_ISTKSZ),1
+CHECK_STKSZ_ALIGN,,,defined(CHECK_STKSZ_ALIGN),1
+CHECK_INTPTR_ALIGN,,,defined(CHECK_INTPTR_ALIGN),1
+CHECK_INTPTR_NONNULL,true,bool,defined(CHECK_INTPTR_NONNULL)
+CHECK_FUNC_ALIGN,,,defined(CHECK_FUNC_ALIGN),1
+CHECK_FUNC_NONNULL,true,bool,defined(CHECK_FUNC_NONNULL)
+CHECK_STACK_ALIGN,,,defined(CHECK_STACK_ALIGN),1
+CHECK_STACK_NONNULL,true,bool,defined(CHECK_STACK_NONNULL)
+CHECK_MPF_ALIGN,,,defined(CHECK_MPF_ALIGN),1
+CHECK_MPF_NONNULL,true,bool,defined(CHECK_MPF_NONNULL)
+CHECK_MB_ALIGN,,,defined(CHECK_MB_ALIGN),1
+sizeof_void_ptr,sizeof(void*)
+sizeof_uint_t,sizeof(uint_t)
+sizeof_size_t,sizeof(size_t)
+sizeof_intptr_t,sizeof(intptr_t)
+sizeof_ID,sizeof(ID)
+sizeof_FP,sizeof(FP)
+sizeof_INTNO,sizeof(INTNO)
+sizeof_INHNO,sizeof(INHNO)
+sizeof_EXCNO,sizeof(EXCNO)
+sizeof_TASK,sizeof(TASK)
+sizeof_TMEHDR,sizeof(TMEHDR)
+sizeof_ISR,sizeof(ISR)
+sizeof_INTHDR,sizeof(INTHDR)
+sizeof_EXCHDR,sizeof(EXCHDR)
+sizeof_INIRTN,sizeof(INIRTN)
+sizeof_TERRTN,sizeof(TERRTN)
+sizeof_NFYHDR,sizeof(NFYHDR)
+sizeof_TINIB,sizeof(TINIB)
+offsetof_TINIB_tskatr,"offsetof(TINIB,tskatr)"
+offsetof_TINIB_exinf,"offsetof(TINIB,exinf)"
+offsetof_TINIB_task,"offsetof(TINIB,task)"
+offsetof_TINIB_ipriority,"offsetof(TINIB,ipriority)"
+offsetof_TINIB_stksz,"offsetof(TINIB,stksz)",,!defined(USE_TSKINICTXB)
+offsetof_TINIB_stk,"offsetof(TINIB,stk)",,!defined(USE_TSKINICTXB)
+sizeof_SEMINIB,sizeof(SEMINIB)
+offsetof_SEMINIB_sematr,"offsetof(SEMINIB,sematr)"
+offsetof_SEMINIB_isemcnt,"offsetof(SEMINIB,isemcnt)"
+offsetof_SEMINIB_maxsem,"offsetof(SEMINIB,maxsem)"
+sizeof_FLGPTN,sizeof(FLGPTN)
+sizeof_FLGINIB,sizeof(FLGINIB)
+offsetof_FLGINIB_flgatr,"offsetof(FLGINIB,flgatr)"
+offsetof_FLGINIB_iflgptn,"offsetof(FLGINIB,iflgptn)"
+sizeof_DTQINIB,sizeof(DTQINIB)
+offsetof_DTQINIB_dtqatr,"offsetof(DTQINIB,dtqatr)"
+offsetof_DTQINIB_dtqcnt,"offsetof(DTQINIB,dtqcnt)"
+offsetof_DTQINIB_p_dtqmb,"offsetof(DTQINIB,p_dtqmb)"
+sizeof_PDQINIB,sizeof(PDQINIB)
+offsetof_PDQINIB_pdqatr,"offsetof(PDQINIB,pdqatr)"
+offsetof_PDQINIB_pdqcnt,"offsetof(PDQINIB,pdqcnt)"
+offsetof_PDQINIB_maxdpri,"offsetof(PDQINIB,maxdpri)"
+offsetof_PDQINIB_p_pdqmb,"offsetof(PDQINIB,p_pdqmb)"
+sizeof_MTXINIB,sizeof(MTXINIB)
+offsetof_MTXINIB_mtxatr,"offsetof(MTXINIB,mtxatr)"
+offsetof_MTXINIB_ceilpri,"offsetof(MTXINIB,ceilpri)"
+sizeof_MPFINIB,sizeof(MPFINIB)
+offsetof_MPFINIB_mpfatr,"offsetof(MPFINIB,mpfatr)"
+offsetof_MPFINIB_blkcnt,"offsetof(MPFINIB,blkcnt)"
+offsetof_MPFINIB_blksz,"offsetof(MPFINIB,blksz)"
+offsetof_MPFINIB_mpf,"offsetof(MPFINIB,mpf)"
+offsetof_MPFINIB_p_mpfmb,"offsetof(MPFINIB,p_mpfmb)"
+sizeof_CYCINIB,sizeof(CYCINIB)
+offsetof_CYCINIB_cycatr,"offsetof(CYCINIB,cycatr)"
+offsetof_CYCINIB_exinf,"offsetof(CYCINIB,exinf)"
+offsetof_CYCINIB_nfyhdr,"offsetof(CYCINIB,nfyhdr)"
+offsetof_CYCINIB_cyctim,"offsetof(CYCINIB,cyctim)"
+offsetof_CYCINIB_cycphs,"offsetof(CYCINIB,cycphs)"
+sizeof_ALMINIB,sizeof(ALMINIB)
+offsetof_ALMINIB_almatr,"offsetof(ALMINIB,almatr)"
+offsetof_ALMINIB_exinf,"offsetof(ALMINIB,exinf)"
+offsetof_ALMINIB_nfyhdr,"offsetof(ALMINIB,nfyhdr)"
+sizeof_ISRINIB,sizeof(ISRINIB)
+offsetof_ISRINIB_isratr,"offsetof(ISRINIB,isratr)"
+offsetof_ISRINIB_exinf,"offsetof(ISRINIB,exinf)"
+offsetof_ISRINIB_p_isr_queue,"offsetof(ISRINIB,p_isr_queue)"
+offsetof_ISRINIB_isr,"offsetof(ISRINIB,isr)"
+offsetof_ISRINIB_isrpri,"offsetof(ISRINIB,isrpri)"
+sizeof_INHINIB,sizeof(INHINIB),,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INHINIB_inhno,"offsetof(INHINIB,inhno)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INHINIB_inhatr,"offsetof(INHINIB,inhatr)",,!defined(OMIT_INITIALIZE_INTERRUPT),,
+offset_INHINIB_int_entry,"offsetof(INHINIB,int_entry)",,!defined(OMIT_INITIALIZE_INTERRUPT),,
+sizeof_INTINIB,sizeof(INTINIB),,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INTINIB_intno,"offsetof(INTINIB,intno)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INTINIB_intatr,"offsetof(INTINIB,intatr)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INTINIB_intpri,"offsetof(INTINIB,intpri)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+sizeof_EXCINIB,sizeof(EXCINIB),,!defined(OMIT_INITIALIZE_EXCEPTION)
+offset_EXCINIB_excno,"offsetof(EXCINIB,excno)",,!defined(OMIT_INITIALIZE_EXCEPTION)
+offset_EXCINIB_excatr,"offsetof(EXCINIB,excatr)",,!defined(OMIT_INITIALIZE_EXCEPTION)
+offset_EXCINIB_exc_entry,"offsetof(EXCINIB,exc_entry)",,!defined(OMIT_INITIALIZE_EXCEPTION)
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_unrename.h
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_unrename.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/kernel_unrename.h	(revision 306)
@@ -221,4 +221,5 @@
 #undef isrinib_table
 #undef aisrinib_table
+#undef isrorder_table
 #undef isrcb_table
 #undef tnum_def_inhno
@@ -236,239 +237,4 @@
 
 
-#ifdef TOPPERS_LABEL_ASM
-
-/*
- *  startup.c
- */
-#undef _kerflg
-#undef _exit_kernel
-#undef _initialize_kmm
-#undef _kernel_malloc
-#undef _kernel_free
-
-/*
- *  task.c
- */
-#undef _p_runtsk
-#undef _p_schedtsk
-#undef _enadsp
-#undef _dspflg
-#undef _ready_queue
-#undef _ready_primap
-#undef _free_tcb
-#undef _initialize_task
-#undef _search_schedtsk
-#undef _make_runnable
-#undef _make_non_runnable
-#undef _make_dormant
-#undef _make_active
-#undef _change_priority
-#undef _rotate_ready_queue
-#undef _task_terminate
-
-/*
- *  taskhook.c
- */
-#undef _mtxhook_check_ceilpri
-#undef _mtxhook_scan_ceilmtx
-#undef _mtxhook_release_all
-
-/*
- *  wait.c
- */
-#undef _make_wait_tmout
-#undef _wait_complete
-#undef _wait_tmout
-#undef _wait_tmout_ok
-#undef _wobj_make_wait
-#undef _wobj_make_wait_tmout
-#undef _init_wait_queue
-
-/*
- *  time_event.c
- */
-#undef _boundary_evttim
-#undef _current_evttim
-#undef _current_hrtcnt
-#undef _monotonic_evttim
-#undef _systim_offset
-#undef _in_signal_time
-#undef _initialize_tmevt
-#undef _tmevt_up
-#undef _tmevt_down
-#undef _update_current_evttim
-#undef _set_hrt_event
-#undef _tmevtb_register
-#undef _tmevtb_enqueue
-#undef _tmevtb_dequeue
-#undef _check_adjtim
-#undef _tmevt_lefttim
-#undef _signal_time
-
-/*
- *  semaphore.c
- */
-#undef _free_semcb
-#undef _initialize_semaphore
-
-/*
- *  eventflag.c
- */
-#undef _free_flgcb
-#undef _initialize_eventflag
-#undef _check_flg_cond
-
-/*
- *  dataqueue.c
- */
-#undef _free_dtqcb
-#undef _initialize_dataqueue
-#undef _enqueue_data
-#undef _force_enqueue_data
-#undef _dequeue_data
-#undef _send_data
-#undef _force_send_data
-#undef _receive_data
-
-/*
- *  pridataq.c
- */
-#undef _free_pdqcb
-#undef _initialize_pridataq
-#undef _enqueue_pridata
-#undef _dequeue_pridata
-#undef _send_pridata
-#undef _receive_pridata
-
-/*
- *  mutex.c
- */
-#undef _free_mtxcb
-#undef _initialize_mutex
-#undef _mutex_check_ceilpri
-#undef _mutex_scan_ceilmtx
-#undef _mutex_drop_priority
-#undef _mutex_acquire
-#undef _mutex_release
-#undef _mutex_release_all
-
-/*
- *  mempfix.c
- */
-#undef _free_mpfcb
-#undef _initialize_mempfix
-#undef _get_mpf_block
-
-/*
- *  time_manage.c
- */
-#undef _check_nfyinfo
-#undef _notify_handler
-
-/*
- *  cyclic.c
- */
-#undef _free_cyccb
-#undef _initialize_cyclic
-#undef _call_cyclic
-
-/*
- *  alarm.c
- */
-#undef _free_almcb
-#undef _initialize_alarm
-#undef _call_alarm
-
-/*
- *  interrupt.c
- */
-#undef _free_isrcb
-#undef _initialize_isr
-#undef _call_isr
-#undef _initialize_interrupt
-
-/*
- *  exception.c
- */
-#undef _initialize_exception
-
-/*
- *  kernel_cfg.c
- */
-#undef _initialize_object
-#undef _call_inirtn
-#undef _call_terrtn
-#undef _tmax_tskid
-#undef _tmax_stskid
-#undef _tinib_table
-#undef _atinib_table
-#undef _torder_table
-#undef _tcb_table
-#undef _tmax_semid
-#undef _tmax_ssemid
-#undef _seminib_table
-#undef _aseminib_table
-#undef _semcb_table
-#undef _tmax_flgid
-#undef _tmax_sflgid
-#undef _flginib_table
-#undef _aflginib_table
-#undef _flgcb_table
-#undef _tmax_dtqid
-#undef _tmax_sdtqid
-#undef _dtqinib_table
-#undef _adtqinib_table
-#undef _dtqcb_table
-#undef _tmax_pdqid
-#undef _tmax_spdqid
-#undef _pdqinib_table
-#undef _apdqinib_table
-#undef _pdqcb_table
-#undef _tmax_mtxid
-#undef _tmax_smtxid
-#undef _mtxinib_table
-#undef _amtxinib_table
-#undef _mtxcb_table
-#undef _tmax_mpfid
-#undef _tmax_smpfid
-#undef _mpfinib_table
-#undef _ampfinib_table
-#undef _mpfcb_table
-#undef _tmax_cycid
-#undef _tmax_scycid
-#undef _cycinib_table
-#undef _acycinib_table
-#undef _acyc_nfyinfo_table
-#undef _cyccb_table
-#undef _tmax_almid
-#undef _tmax_salmid
-#undef _alminib_table
-#undef _aalminib_table
-#undef _aalm_nfyinfo_table
-#undef _almcb_table
-#undef _tnum_isr_queue
-#undef _isr_queue_list
-#undef _isr_queue_table
-#undef _tmax_isrid
-#undef _tmax_sisrid
-#undef _isrinib_table
-#undef _aisrinib_table
-#undef _isrcb_table
-#undef _tnum_def_inhno
-#undef _inhinib_table
-#undef _tnum_cfg_intno
-#undef _intinib_table
-#undef _tnum_def_excno
-#undef _excinib_table
-#undef _tmevt_heap
-#undef _istksz
-#undef _istk
-#undef _istkpt
-#undef _kmmsz
-#undef _kmm
-
-
-#endif /* TOPPERS_LABEL_ASM */
-
 #include "target_unrename.h"
 
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/mempfix.c
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/mempfix.c	(revision 302)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/mempfix.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: mempfix.c 471 2015-12-30 10:03:16Z ertl-hiro $
+ *  $Id: mempfix.c 717 2016-03-31 07:03:53Z ertl-hiro $
  */
 
@@ -226,5 +226,7 @@
 	MPFINIB	*p_mpfinib;
 	ATR		mpfatr;
-	void	*mpf;
+	uint_t	blkcnt;
+	uint_t	blksz;
+	MPF_T	*mpf;
 	MPFMB	*p_mpfmb;
 	ER		ercd;
@@ -232,16 +234,20 @@
 	LOG_ACRE_MPF_ENTER(pk_cmpf);
 	CHECK_TSKCTX_UNL();
-	CHECK_RSATR(pk_cmpf->mpfatr, TA_TPRI);
-	CHECK_PAR(pk_cmpf->blkcnt != 0);
-	CHECK_PAR(pk_cmpf->blksz != 0);
-	if (pk_cmpf->mpf != NULL) {
-		CHECK_PAR(MPF_ALIGN(pk_cmpf->mpf));
-	}
-	if (pk_cmpf->mpfmb != NULL) {
-		CHECK_PAR(MB_ALIGN(pk_cmpf->mpfmb));
-	}
+
 	mpfatr = pk_cmpf->mpfatr;
+	blkcnt = pk_cmpf->blkcnt;
+	blksz = pk_cmpf->blksz;
 	mpf = pk_cmpf->mpf;
 	p_mpfmb = pk_cmpf->mpfmb;
+
+	CHECK_RSATR(mpfatr, TA_TPRI);
+	CHECK_PAR(blkcnt != 0);
+	CHECK_PAR(blksz != 0);
+	if (mpf != NULL) {
+		CHECK_PAR(MPF_ALIGN(mpf));
+	}
+	if (p_mpfmb != NULL) {
+		CHECK_PAR(MB_ALIGN(p_mpfmb));
+	}
 
 	lock_cpu();
@@ -251,5 +257,5 @@
 	else {
 		if (mpf == NULL) {
-			mpf = kernel_malloc(ROUND_MPF_T(pk_cmpf->blksz) * pk_cmpf->blkcnt);
+			mpf = kernel_malloc(ROUND_MPF_T(blksz) * blkcnt);
 			mpfatr |= TA_MEMALLOC;
 		}
@@ -259,9 +265,9 @@
 		else {
 			if (p_mpfmb == NULL) {
-				p_mpfmb = kernel_malloc(sizeof(MPFMB) * pk_cmpf->blkcnt);
+				p_mpfmb = kernel_malloc(sizeof(MPFMB) * blkcnt);
 				mpfatr |= TA_MBALLOC;
 			}
 			if (p_mpfmb == NULL) {
-				if (pk_cmpf->mpf == NULL) {
+				if (mpf == NULL) {
 					kernel_free(mpf);
 				}
@@ -272,6 +278,6 @@
 				p_mpfinib = (MPFINIB *)(p_mpfcb->p_mpfinib);
 				p_mpfinib->mpfatr = mpfatr;
-				p_mpfinib->blkcnt = pk_cmpf->blkcnt;
-				p_mpfinib->blksz = ROUND_MPF_T(pk_cmpf->blksz);
+				p_mpfinib->blkcnt = blkcnt;
+				p_mpfinib->blksz = ROUND_MPF_T(blksz);
 				p_mpfinib->mpf = mpf;
 				p_mpfinib->p_mpfmb = p_mpfmb;
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/mempfix.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/mempfix.tf	(revision 302)
+++ 	(revision )
@@ -1,203 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: mempfix.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		åºå®é·ã¡ã¢ãªãã¼ã«æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  AID_MPFã®å¦ç
-$
-$num_ampfid = 0$
-$FOREACH i AMPF.ORDER_LIST$
-$	// nompfãè² ã®å ´åï¼E_PARï¼
-	$IF AMPF.NOMPF[i] < 0$
-		$ERROR AMPF.TEXT_LINE[i]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-									"nompf", AMPF.NOMPF[i], "AID_MPF")$
-		$END$
-	$END$
-	$num_ampfid = num_ampfid + AMPF.NOMPF[i]$
-$END$
-$num_mpfid = LENGTH(MPF.ID_LIST) + num_ampfid$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_MPFID	$num_mpfid$$NL$
-$FOREACH id MPF.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Fixed-sized Memorypool Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  åºå®é·ã¡ã¢ãªãã¼ã«ã®IDçªå·ãä¿æããå¤æ°
-$
-$IF USE_EXTERNAL_ID$
-	$FOREACH id MPF.ID_LIST$
-		const ID $id$_id = $+id$;$NL$
-	$END$
-$END$
-
-$
-$  éçã«çæãããåºå®é·ã¡ã¢ãªãã¼ã«ã®æ°
-$
-#define TNUM_SMPFID	$LENGTH(MPF.ID_LIST)$$NL$
-$NL$
-
-$
-$  åºå®é·ã¡ã¢ãªãã¼ã«IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_mpfid = (TMIN_MPFID + TNUM_MPFID - 1);$NL$
-const ID _kernel_tmax_smpfid = (TMIN_MPFID + TNUM_SMPFID - 1);$NL$
-$NL$
-
-$
-$  åºå®é·ã¡ã¢ãªãã¼ã«åæåãã­ãã¯
-$
-$IF LENGTH(MPF.ID_LIST)$
-	$FOREACH mpfid MPF.ID_LIST$
-$		// mpfatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2225ï¼½
-$		//ï¼TA_TPRIä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-		$IF (MPF.MPFATR[mpfid] & ~TA_TPRI) != 0$
-			$ERROR MPF.TEXT_LINE[mpfid]$E_RSATR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"mpfatr", MPF.MPFATR[mpfid], mpfid, "CRE_MPF")$
-			$END$
-		$END$
-
-$		// blkcntã0ä»¥ä¸ã®å ´åï¼E_PARï¼ï¼»NGKI2229ï¼½
-		$IF MPF.BLKCNT[mpfid] <= 0$
-			$ERROR MPF.TEXT_LINE[mpfid]$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"blkcnt", MPF.BLKCNT[mpfid], mpfid, "CRE_MPF")$
-			$END$
-		$END$
-
-$		// blkszã0ä»¥ä¸ã®å ´åï¼E_PARï¼ï¼»NGKI2230ï¼½
-		$IF MPF.BLKSZ[mpfid] <= 0$
-			$ERROR MPF.TEXT_LINE[mpfid]$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"blksz", MPF.BLKSZ[mpfid], mpfid, "CRE_MPF")$
-			$END$
-		$END$
-
-$		// åºå®é·ã¡ã¢ãªãã¼ã«é å
-		$IF EQ(MPF.MPF[mpfid], "NULL")$
-			static MPF_T _kernel_mpf_$mpfid$[($MPF.BLKCNT[mpfid]$)$SPC$
-									* COUNT_MPF_T($MPF.BLKSZ[mpfid]$)];$NL$
-		$END$
-
-$		// mpfmbãNULLã§ãªãå ´åï¼E_NOSPTï¼ï¼»ASPS0166ï¼½
-		$IF !EQ(MPF.MPFMB[mpfid], "NULL")$
-			$ERROR MPF.TEXT_LINE[mpfid]$E_NOSPT:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"mpfmb", MPF.MPFMB[mpfid], mpfid, "CRE_MPF")$
-			$END$
-		$END$
-
-$		// åºå®é·ã¡ã¢ãªãã¼ã«ç®¡çé å
-		static MPFMB _kernel_mpfmb_$mpfid$[$MPF.BLKCNT[mpfid]$];$NL$
-	$END$
-
-$	// åºå®é·ã¡ã¢ãªãã¼ã«åæåãã­ãã¯
-	const MPFINIB _kernel_mpfinib_table[TNUM_SMPFID] = {$NL$
-	$JOINEACH mpfid MPF.ID_LIST ",\n"$
-		$TAB${$SPC$
-			($MPF.MPFATR[mpfid]$),$SPC$
-			($MPF.BLKCNT[mpfid]$),$SPC$
-			ROUND_MPF_T($MPF.BLKSZ[mpfid]$),$SPC$
-			$IF EQ(MPF.MPF[mpfid],"NULL")$
-				_kernel_mpf_$mpfid$
-			$ELSE$
-				(void *)($MPF.MPF[mpfid]$)
-			$END$,$SPC$
-			_kernel_mpfmb_$mpfid$$SPC$
-	}$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const MPFINIB, _kernel_mpfinib_table);$NL$
-$END$$NL$
-
-$
-$  åççæåºå®é·ã¡ã¢ãªãã¼ã«ç¨ã®åºå®é·ã¡ã¢ãªãã¼ã«åæåãã­ãã¯
-$
-$IF num_ampfid > 0$
-	MPFINIB _kernel_ampfinib_table[$num_ampfid$];$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(MPFINIB, _kernel_ampfinib_table);$NL$
-$END$$NL$
-
-$
-$  åºå®é·ã¡ã¢ãªãã¼ã«ç®¡çãã­ãã¯ã¨åºå®é·ã¡ã¢ãªãã¼ã«æ©è½åæåé¢æ°
-$
-$IF num_mpfid > 0$
-	MPFCB _kernel_mpfcb_table[TNUM_MPFID];$NL$
-	$initfuncs = APPEND(initfuncs, "_kernel_initialize_mempfix();")$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(MPFCB, _kernel_mpfcb_table);$NL$
-$END$$NL$
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/mutex.c
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/mutex.c	(revision 302)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/mutex.c	(revision 306)
@@ -4,5 +4,5 @@
  *      Advanced Standard Profile Kernel
  * 
- *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -51,5 +51,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: mutex.c 471 2015-12-30 10:03:16Z ertl-hiro $
+ *  $Id: mutex.c 717 2016-03-31 07:03:53Z ertl-hiro $
  */
 
@@ -319,5 +319,5 @@
 	if (MTX_CEILING(p_mtxcb)
 					&& p_mtxcb->p_mtxinib->ceilpri < p_tcb->priority) {
-		(void) change_priority(p_tcb, p_mtxcb->p_mtxinib->ceilpri, true);
+		change_priority(p_tcb, p_mtxcb->p_mtxinib->ceilpri, true);
 	}
 }
@@ -391,13 +391,19 @@
 	MTXCB	*p_mtxcb;
 	MTXINIB	*p_mtxinib;
+	ATR		mtxatr;
+	PRI		ceilpri;
 	ER		ercd;
 
 	LOG_ACRE_MTX_ENTER(pk_cmtx);
 	CHECK_TSKCTX_UNL();							/*ï¼»NGKI2023ï¼½ï¼»NGKI2024ï¼½*/
-	if (pk_cmtx->mtxatr == TA_CEILING) {
-		CHECK_PAR(VALID_TPRI(pk_cmtx->ceilpri));	/*ï¼»NGKI2037ï¼½*/
-	}
-	else {
-		CHECK_RSATR(pk_cmtx->mtxatr, TA_TPRI);	/*ï¼»NGKI2025ï¼½*/
+
+	mtxatr = pk_cmtx->mtxatr;
+	ceilpri = pk_cmtx->ceilpri;
+
+	if (mtxatr == TA_CEILING) {
+		CHECK_PAR(VALID_TPRI(ceilpri));			/*ï¼»NGKI2037ï¼½*/
+	}
+	else {
+		CHECK_RSATR(mtxatr, TA_TPRI);			/*ï¼»NGKI2025ï¼½*/
 	}
 
@@ -409,6 +415,6 @@
 		p_mtxcb = ((MTXCB *) queue_delete_next(&free_mtxcb));
 		p_mtxinib = (MTXINIB *)(p_mtxcb->p_mtxinib);
-		p_mtxinib->mtxatr = pk_cmtx->mtxatr;
-		p_mtxinib->ceilpri = INT_PRIORITY(pk_cmtx->ceilpri);
+		p_mtxinib->mtxatr = mtxatr;
+		p_mtxinib->ceilpri = INT_PRIORITY(ceilpri);
 
 		queue_initialize(&(p_mtxcb->wait_queue));
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/mutex.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/mutex.tf	(revision 302)
+++ 	(revision )
@@ -1,180 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: mutex.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		ãã¥ã¼ããã¯ã¹æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  AID_MTXã®å¦ç
-$
-$num_amtxid = 0$
-$FOREACH i AMTX.ORDER_LIST$
-$	// nomtxãè² ã®å ´åï¼E_PARï¼
-	$IF AMTX.NOMTX[i] < 0$
-		$ERROR AMTX.TEXT_LINE[i]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-									"nomtx", AMTX.NOMTX[i], "AID_MTX")$
-		$END$
-	$END$
-	$num_amtxid = num_amtxid + AMTX.NOMTX[i]$
-$END$
-$num_mtxid = LENGTH(MTX.ID_LIST) + num_amtxid$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_MTXID	$num_mtxid$$NL$
-$FOREACH id MTX.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Mutex Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  ãã¥ã¼ããã¯ã¹ã®IDçªå·ãä¿æããå¤æ°
-$
-$IF USE_EXTERNAL_ID$
-	$FOREACH id MTX.ID_LIST$
-		const ID $id$_id = $+id$;$NL$
-	$END$
-$END$
-
-$
-$  éçã«çæããããã¥ã¼ããã¯ã¹ã®æ°
-$
-#define TNUM_SMTXID	$LENGTH(MTX.ID_LIST)$$NL$
-$NL$
-
-$
-$  ãã¥ã¼ããã¯ã¹IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_mtxid = (TMIN_MTXID + TNUM_MTXID - 1);$NL$
-const ID _kernel_tmax_smtxid = (TMIN_MTXID + TNUM_SMTXID - 1);$NL$
-$NL$
-
-$
-$  ãã¥ã¼ããã¯ã¹åæåãã­ãã¯
-$
-$IF LENGTH(MTX.ID_LIST)$
-	$FOREACH mtxid MTX.ID_LIST$
-$		// mtxatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2025ï¼½
-$		//ï¼TA_NULLï¼TA_TPRIï¼TA_CEILINGã®ãããã§ããªãå ´åï¼
-		$IF !(MTX.MTXATR[mtxid] == 0 || MTX.MTXATR[mtxid] == TA_TPRI
-										|| MTX.MTXATR[mtxid] == TA_CEILING)$
-			$ERROR MTX.TEXT_LINE[mtxid]$E_RSATR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"mtxatr", MTX.MTXATR[mtxid], mtxid, "CRE_MTX")$
-			$END$
-		$END$
-
-$		// ceilpriãæªæå®ã®å ´åã¯0ã¨è¦ãªã
-		$IF !LENGTH(MTX.CEILPRI[mtxid])$
-			$MTX.CEILPRI[mtxid] = 0$
-		$END$
-
-$		// åªå
-åº¦ä¸éãã¥ã¼ããã¯ã¹ã§ï¼(TMIN_TPRI <= ceilpri && ceilpri <=
-$		// TMAX_TPRI)ã§ãªãå ´åï¼E_PARï¼ï¼»NGKI2037ï¼½
-		$IF MTX.MTXATR[mtxid] == TA_CEILING && (MTX.CEILPRI[mtxid] < TMIN_TPRI
-											|| TMAX_TPRI < MTX.CEILPRI[mtxid])$
-			$ERROR MTX.TEXT_LINE[mtxid]$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"ceilpri", MTX.CEILPRI[mtxid], mtxid, "CRE_MTX")$
-			$END$
-		$END$
-	$END$
-
-$	// ãã¥ã¼ããã¯ã¹åæåãã­ãã¯
-	const MTXINIB _kernel_mtxinib_table[TNUM_SMTXID] = {$NL$
-	$JOINEACH mtxid MTX.ID_LIST ",\n"$
-		$TAB${$SPC$
-			($MTX.MTXATR[mtxid]$),$SPC$
-			INT_PRIORITY($MTX.CEILPRI[mtxid]$)$SPC$
-		}$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const MTXINIB, _kernel_mtxinib_table);$NL$
-$END$$NL$
-
-$
-$  åççæãã¥ã¼ããã¯ã¹ç¨ã®ãã¥ã¼ããã¯ã¹åæåãã­ãã¯
-$
-$IF num_amtxid > 0$
-	MTXINIB _kernel_amtxinib_table[$num_amtxid$];$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(MTXINIB, _kernel_amtxinib_table);$NL$
-$END$$NL$
-
-$
-$  ãã¥ã¼ããã¯ã¹ç®¡çãã­ãã¯ã¨ãã¥ã¼ããã¯ã¹æ©è½åæåé¢æ°
-$
-$IF num_mtxid > 0$
-	MTXCB _kernel_mtxcb_table[TNUM_MTXID];$NL$
-	$initfuncs = APPEND(initfuncs, "_kernel_initialize_mutex();")$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(MTXCB, _kernel_mtxcb_table);$NL$
-$END$$NL$
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/pridataq.c
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/pridataq.c	(revision 302)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/pridataq.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: pridataq.c 471 2015-12-30 10:03:16Z ertl-hiro $
+ *  $Id: pridataq.c 717 2016-03-31 07:03:53Z ertl-hiro $
  */
 
@@ -348,4 +348,6 @@
 	PDQINIB	*p_pdqinib;
 	ATR		pdqatr;
+	uint_t	pdqcnt;
+	PRI		maxdpri;
 	PDQMB	*p_pdqmb;
 	ER		ercd;
@@ -353,8 +355,12 @@
 	LOG_ACRE_PDQ_ENTER(pk_cpdq);
 	CHECK_TSKCTX_UNL();
-	CHECK_RSATR(pk_cpdq->pdqatr, TA_TPRI);
-	CHECK_PAR(VALID_DPRI(pk_cpdq->maxdpri));
+
 	pdqatr = pk_cpdq->pdqatr;
+	pdqcnt = pk_cpdq->pdqcnt;
+	maxdpri = pk_cpdq->maxdpri;
 	p_pdqmb = pk_cpdq->pdqmb;
+
+	CHECK_RSATR(pdqatr, TA_TPRI);
+	CHECK_PAR(VALID_DPRI(maxdpri));
 
 	lock_cpu();
@@ -363,9 +369,9 @@
 	}
 	else {
-		if (pk_cpdq->pdqcnt != 0 && p_pdqmb == NULL) {
-			p_pdqmb = kernel_malloc(sizeof(PDQMB) * pk_cpdq->pdqcnt);
+		if (pdqcnt != 0 && p_pdqmb == NULL) {
+			p_pdqmb = kernel_malloc(sizeof(PDQMB) * pdqcnt);
 			pdqatr |= TA_MBALLOC;
 		}
-		if (pk_cpdq->pdqcnt != 0 && p_pdqmb == NULL) {
+		if (pdqcnt != 0 && p_pdqmb == NULL) {
 			ercd = E_NOMEM;
 		}
@@ -374,6 +380,6 @@
 			p_pdqinib = (PDQINIB *)(p_pdqcb->p_pdqinib);
 			p_pdqinib->pdqatr = pdqatr;
-			p_pdqinib->pdqcnt = pk_cpdq->pdqcnt;
-			p_pdqinib->maxdpri = pk_cpdq->maxdpri;
+			p_pdqinib->pdqcnt = pdqcnt;
+			p_pdqinib->maxdpri = maxdpri;
 			p_pdqinib->p_pdqmb = p_pdqmb;
 
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/pridataq.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/pridataq.tf	(revision 302)
+++ 	(revision )
@@ -1,211 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: pridataq.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		åªå
-åº¦ãã¼ã¿ã­ã¥ã¼æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  AID_PDQã®å¦ç
-$
-$num_apdqid = 0$
-$FOREACH i APDQ.ORDER_LIST$
-$	// nopdqãè² ã®å ´åï¼E_PARï¼
-	$IF APDQ.NOPDQ[i] < 0$
-		$ERROR APDQ.TEXT_LINE[i]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-									"nopdq", APDQ.NOPDQ[i], "AID_PDQ")$
-		$END$
-	$END$
-	$num_apdqid = num_apdqid + APDQ.NOPDQ[i]$
-$END$
-$num_pdqid = LENGTH(PDQ.ID_LIST) + num_apdqid$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_PDQID	$num_pdqid$$NL$
-$FOREACH id PDQ.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Priority Dataqueue Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  åªå
-åº¦ãã¼ã¿ã­ã¥ã¼ã®IDçªå·ãä¿æããå¤æ°
-$
-$IF USE_EXTERNAL_ID$
-	$FOREACH id PDQ.ID_LIST$
-		const ID $id$_id = $+id$;$NL$
-	$END$
-$END$
-
-$
-$  éçã«çæãããåªå
-åº¦ãã¼ã¿ã­ã¥ã¼ã®æ°
-$
-#define TNUM_SPDQID	$LENGTH(PDQ.ID_LIST)$$NL$
-$NL$
-
-$
-$  åªå
-åº¦ãã¼ã¿ã­ã¥ã¼IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_pdqid = (TMIN_PDQID + TNUM_PDQID - 1);$NL$
-const ID _kernel_tmax_spdqid = (TMIN_PDQID + TNUM_SPDQID - 1);$NL$
-$NL$
-
-$
-$  åªå
-åº¦ãã¼ã¿ã­ã¥ã¼åæåãã­ãã¯
-$
-$IF LENGTH(PDQ.ID_LIST)$
-	$FOREACH pdqid PDQ.ID_LIST$
-$		// pdqatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1804ï¼½
-$		//ï¼TA_TPRIä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-		$IF (PDQ.PDQATR[pdqid] & ~TA_TPRI) != 0$
-			$ERROR PDQ.TEXT_LINE[pdqid]$E_RSATR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"pdqatr", PDQ.PDQATR[pdqid], pdqid, "CRE_PDQ")$
-			$END$
-		$END$
-
-$		// pdqcntãè² ã®å ´åï¼E_PARï¼ï¼»NGKI3289ï¼½
-		$IF PDQ.PDQCNT[pdqid] < 0$
-			$ERROR PDQ.TEXT_LINE[pdqid]$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"pdqcnt", PDQ.PDQCNT[pdqid], pdqid, "CRE_PDQ")$
-			$END$
-		$END$
-
-$		// (TMIN_DPRI <= maxdpri && maxdpri <= TMAX_DPRI)ã§ãªãå ´åï¼E_PARï¼
-$		// ï¼»NGKI1819ï¼½
-		$IF !(TMIN_DPRI <= PDQ.MAXDPRI[pdqid]
-								&& PDQ.MAXDPRI[pdqid] <= TMAX_DPRI)$
-			$ERROR PDQ.TEXT_LINE[pdqid]$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"maxdpri", PDQ.MAXDPRI[pdqid], pdqid, "CRE_PDQ")$
-			$END$
-		$END$
-
-$		// pdqmbãNULLã§ãªãå ´åï¼E_NOSPTï¼ï¼»ASPS0142ï¼½
-		$IF !EQ(PDQ.PDQMB[pdqid], "NULL")$
-			$ERROR PDQ.TEXT_LINE[pdqid]$E_NOSPT:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"pdqmb", PDQ.PDQMB[pdqid], pdqid, "CRE_PDQ")$
-			$END$
-		$END$
-
-$		// åªå
-åº¦ãã¼ã¿ã­ã¥ã¼ç®¡çé å
-		$IF PDQ.PDQCNT[pdqid]$
-			static PDQMB _kernel_pdqmb_$pdqid$[$PDQ.PDQCNT[pdqid]$];$NL$
-		$END$
-	$END$
-
-$	// åªå
-åº¦ãã¼ã¿ã­ã¥ã¼åæåãã­ãã¯
-	const PDQINIB _kernel_pdqinib_table[TNUM_SPDQID] = {$NL$
-	$JOINEACH pdqid PDQ.ID_LIST ",\n"$
-		$TAB${$SPC$
-			($PDQ.PDQATR[pdqid]$),$SPC$
-			($PDQ.PDQCNT[pdqid]$),$SPC$
-			($PDQ.MAXDPRI[pdqid]$),$SPC$
-			$IF PDQ.PDQCNT[pdqid]$
-				_kernel_pdqmb_$pdqid$
-			$ELSE$
-				NULL
-			$END$$SPC$
-		}$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const PDQINIB, _kernel_pdqinib_table);$NL$
-$END$$NL$
-
-$
-$  åççæåªå
-åº¦ãã¼ã¿ã­ã¥ã¼ç¨ã®åªå
-åº¦ãã¼ã¿ã­ã¥ã¼åæåãã­ãã¯
-$
-$IF num_apdqid > 0$
-	PDQINIB _kernel_apdqinib_table[$num_apdqid$];$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(PDQINIB, _kernel_apdqinib_table);$NL$
-$END$$NL$
-
-$
-$  åªå
-åº¦ãã¼ã¿ã­ã¥ã¼ç®¡çãã­ãã¯ã¨åªå
-åº¦ãã¼ã¿ã­ã¥ã¼æ©è½åæåé¢æ°
-$
-$IF num_pdqid > 0$
-	PDQCB _kernel_pdqcb_table[TNUM_PDQID];$NL$
-	$initfuncs = APPEND(initfuncs, "_kernel_initialize_pridataq();")$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(PDQCB, _kernel_pdqcb_table);$NL$
-$END$$NL$
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/semaphore.c
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/semaphore.c	(revision 302)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/semaphore.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: semaphore.c 471 2015-12-30 10:03:16Z ertl-hiro $
+ *  $Id: semaphore.c 717 2016-03-31 07:03:53Z ertl-hiro $
  */
 
@@ -190,11 +190,18 @@
 	SEMCB	*p_semcb;
 	SEMINIB	*p_seminib;
+	ATR		sematr;
+	uint_t	isemcnt, maxsem;
 	ER		ercd;
 
 	LOG_ACRE_SEM_ENTER(pk_csem);
 	CHECK_TSKCTX_UNL();
-	CHECK_RSATR(pk_csem->sematr, TA_TPRI);
-	CHECK_PAR(0 <= pk_csem->isemcnt && pk_csem->isemcnt <= pk_csem->maxsem);
-	CHECK_PAR(1 <= pk_csem->maxsem && pk_csem->maxsem <= TMAX_MAXSEM);
+
+	sematr = pk_csem->sematr;
+	isemcnt = pk_csem->isemcnt;
+	maxsem = pk_csem->maxsem;
+
+	CHECK_RSATR(sematr, TA_TPRI);
+	CHECK_PAR(0 <= isemcnt && isemcnt <= maxsem);
+	CHECK_PAR(1 <= maxsem && maxsem <= TMAX_MAXSEM);
 
 	lock_cpu();
@@ -205,7 +212,7 @@
 		p_semcb = ((SEMCB *) queue_delete_next(&free_semcb));
 		p_seminib = (SEMINIB *)(p_semcb->p_seminib);
-		p_seminib->sematr = pk_csem->sematr;
-		p_seminib->isemcnt = pk_csem->isemcnt;
-		p_seminib->maxsem = pk_csem->maxsem;
+		p_seminib->sematr = sematr;
+		p_seminib->isemcnt = isemcnt;
+		p_seminib->maxsem = maxsem;
 
 		queue_initialize(&(p_semcb->wait_queue));
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/semaphore.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/semaphore.tf	(revision 302)
+++ 	(revision )
@@ -1,181 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: semaphore.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		ã»ããã©æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  AID_SEMã®å¦ç
-$
-$num_asemid = 0$
-$FOREACH i ASEM.ORDER_LIST$
-$	// nosemãè² ã®å ´åï¼E_PARï¼
-	$IF ASEM.NOSEM[i] < 0$
-		$ERROR ASEM.TEXT_LINE[i]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-									"nosem", ASEM.NOSEM[i], "AID_SEM")$
-		$END$
-	$END$
-	$num_asemid = num_asemid + ASEM.NOSEM[i]$
-$END$
-$num_semid = LENGTH(SEM.ID_LIST) + num_asemid$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_SEMID	$num_semid$$NL$
-$FOREACH id SEM.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Semaphore Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  ã»ããã©ã®IDçªå·ãä¿æããå¤æ°
-$
-$IF USE_EXTERNAL_ID$
-	$FOREACH id SEM.ID_LIST$
-		const ID $id$_id = $+id$;$NL$
-	$END$$NL$
-$END$
-
-$
-$  éçã«çæãããã»ããã©ã®æ°
-$
-#define TNUM_SSEMID	$LENGTH(SEM.ID_LIST)$$NL$
-$NL$
-
-$
-$  ã»ããã©IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_semid = (TMIN_SEMID + TNUM_SEMID - 1);$NL$
-const ID _kernel_tmax_ssemid = (TMIN_SEMID + TNUM_SSEMID - 1);$NL$
-$NL$
-
-$
-$  ã»ããã©åæåãã­ãã¯
-$
-$IF LENGTH(SEM.ID_LIST)$
-	$FOREACH semid SEM.ID_LIST$
-$		// sematrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1456ï¼½
-$		//ï¼TA_TPRIä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-		$IF (SEM.SEMATR[semid] & ~TA_TPRI) != 0$
-			$ERROR SEM.TEXT_LINE[semid]$E_RSATR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"sematr", SEM.SEMATR[semid], semid, "CRE_SEM")$
-			$END$
-		$END$
-
-$		// (1 <= maxsem && maxsem <= TMAX_MAXSEM)ã§ãªãå ´åï¼E_PARï¼ï¼»NGKI1468ï¼½
-		$IF !(1 <= SEM.MAXSEM[semid] && SEM.MAXSEM[semid] <= TMAX_MAXSEM)$
-			$ERROR SEM.TEXT_LINE[semid]$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"maxsem", SEM.MAXSEM[semid], semid, "CRE_SEM")$
-			$END$
-		$END$
-
-$		// (0 <= isemcnt && isemcnt <= maxsem)ã§ãªãå ´åï¼E_PARï¼ï¼»NGKI1466ï¼½
-		$IF !(0 <= SEM.ISEMCNT[semid]
-								&& SEM.ISEMCNT[semid] <= SEM.MAXSEM[semid])$
-			$ERROR SEM.TEXT_LINE[semid]$E_PAR:$SPC$
-				$FORMAT(_("too large %1% `%2%\' of `%3%\' in %4%"),
-							"isemcnt", SEM.ISEMCNT[semid], semid, "CRE_SEM")$
-			$END$
-		$END$
-	$END$
-
-$	// ã»ããã©åæåãã­ãã¯
-	const SEMINIB _kernel_seminib_table[TNUM_SSEMID] = {$NL$
-	$JOINEACH semid SEM.ID_LIST ",\n"$
-		$TAB${$SPC$
-			($SEM.SEMATR[semid]$),$SPC$
-			($SEM.ISEMCNT[semid]$),$SPC$
-			($SEM.MAXSEM[semid]$)$SPC$
-		}$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const SEMINIB, _kernel_seminib_table);$NL$
-$END$$NL$
-
-$
-$  åççæã»ããã©ç¨ã®ã»ããã©åæåãã­ãã¯
-$
-$IF num_asemid > 0$
-	SEMINIB _kernel_aseminib_table[$num_asemid$];$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(SEMINIB, _kernel_aseminib_table);$NL$
-$END$$NL$
-
-$
-$  ã»ããã©ç®¡çãã­ãã¯ã¨ã»ããã©æ©è½åæåé¢æ°
-$
-$IF num_semid > 0$
-	SEMCB _kernel_semcb_table[TNUM_SEMID];$NL$
-	$initfuncs = APPEND(initfuncs, "_kernel_initialize_semaphore();")$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(SEMCB, _kernel_semcb_table);$NL$
-$END$$NL$
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/startup.c
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/startup.c	(revision 302)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/startup.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: startup.c 189 2014-06-22 10:49:57Z ertl-hiro $
+ *  $Id: startup.c 509 2016-01-12 06:06:14Z ertl-hiro $
  */
 
@@ -101,4 +101,11 @@
 sta_ker(void)
 {
+	/*
+	 *  TECSã®åæå
+	 */
+#ifndef TOPPERS_OMIT_TECS
+	initialize_tecs();
+#endif /* TOPPERS_OMIT_TECS */
+
 	/*
 	 *  ã¿ã¼ã²ããä¾å­ã®åæå
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/task.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/task.tf	(revision 302)
+++ 	(revision )
@@ -1,234 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: task.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  AID_TSKã®å¦ç
-$
-$num_atskid = 0$
-$FOREACH i ATSK.ORDER_LIST$
-$	// notskãè² ã®å ´åï¼E_PARï¼
-	$IF ATSK.NOTSK[i] < 0$
-		$ERROR ATSK.TEXT_LINE[i]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-									"notsk", ATSK.NOTSK[i], "AID_TSK")$
-		$END$
-	$END$
-	$num_atskid = num_atskid + ATSK.NOTSK[i]$
-$END$
-$num_tskid = LENGTH(TSK.ID_LIST) + num_atskid$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_TSKID	$num_tskid$$NL$
-$FOREACH id TSK.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Task Management Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  ã¿ã¹ã¯ã®IDçªå·ãä¿æããå¤æ°
-$
-$IF USE_EXTERNAL_ID$
-	$FOREACH id TSK.ID_LIST$
-		const ID $id$_id = $+id$;$NL$
-	$END$$NL$
-$END$
-
-$
-$  ã¿ã¹ã¯ã1ã¤ãç»é²ããã¦ããªãå ´åï¼»NGKI0033ï¼½
-$
-$IF !LENGTH(TSK.ID_LIST)$
-	$ERROR$$FORMAT(_("no task is registered"))$$END$
-$END$
-
-$
-$  éçã«çæãããã¿ã¹ã¯ã®æ°
-$
-#define TNUM_STSKID	$LENGTH(TSK.ID_LIST)$$NL$
-$NL$
-
-$
-$  ã¿ã¹ã¯IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_tskid = (TMIN_TSKID + TNUM_TSKID - 1);$NL$
-const ID _kernel_tmax_stskid = (TMIN_TSKID + TNUM_STSKID - 1);$NL$
-$NL$
-
-$
-$  ã¨ã©ã¼ãã§ãã¯
-$
-$FOREACH tskid TSK.ID_LIST$
-$	// tskatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1028ï¼½
-$	//ï¼TA_ACTï¼TA_NOACTQUEï¼TARGET_TSKATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-	$IF (TSK.TSKATR[tskid] & ~(TA_ACT|TA_NOACTQUE|TARGET_TSKATR)) != 0$
-		$ERROR TSK.TEXT_LINE[tskid]$E_RSATR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-						"tskatr", TSK.TSKATR[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-
-$	// (TMIN_TPRI <= itskpri && itskpri <= TMAX_TPRI)ã§ãªãå ´åï¼»NGKI1034ï¼½
-	$IF !(TMIN_TPRI <= TSK.ITSKPRI[tskid] && TSK.ITSKPRI[tskid] <= TMAX_TPRI)$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-						"itskpri", TSK.ITSKPRI[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-$END$
-
-$
-$  ã¹ã¿ãã¯é åã®çæã¨ããã«é¢ããã¨ã©ã¼ãã§ãã¯
-$
-$FOREACH tskid TSK.ID_LIST$
-$	// stkszã0ä»¥ä¸ãï¼ã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_STKSZï¼ããã
-$	// å°ããå ´åï¼»NGKI1042ï¼½
-	$IF TSK.STKSZ[tskid] <= 0 || (TARGET_MIN_STKSZ
-									&& TSK.STKSZ[tskid] < TARGET_MIN_STKSZ)$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("too small %1% `%2%\' of `%3%\' in %4%"),
-						"stksz", TSK.STKSZ[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-
-$ 	// stkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´åï¼»NGKI1056ï¼½
-	$IF !EQ(TSK.STK[tskid], "NULL") && CHECK_STKSZ_ALIGN
-							&& (TSK.STKSZ[tskid] & (CHECK_STKSZ_ALIGN - 1))$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-						"stksz", TSK.STKSZ[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-
-$	// ã¹ã¿ãã¯é åã®è¨­å®ï¼»NGKI1041ï¼½
-	$IF EQ(TSK.STK[tskid],"NULL")$
-$		// ã¹ã¿ãã¯é åã®çæï¼»NGKI1049ï¼½
-		$TSK.TINIB_STKSZ[tskid] = ALLOC_STACK(CONCAT("_kernel_stack_",
-												tskid), TSK.STKSZ[tskid])$
-		$TSK.TINIB_STK[tskid] = CONCAT("_kernel_stack_", tskid)$
-	$ELSE$
-		$TSK.TINIB_STKSZ[tskid] = FORMAT("(%1%)", TSK.STKSZ[tskid])$
-		$TSK.TINIB_STK[tskid] = FORMAT("(void *)(%1%)", TSK.STK[tskid])$
-	$END$
-$END$
-$NL$
-
-$
-$  ã¿ã¹ã¯åæåãã­ãã¯ã®çæï¼ã¿ã¹ã¯ã¯1åä»¥ä¸å­å¨ããï¼
-$
-const TINIB _kernel_tinib_table[TNUM_STSKID] = {$NL$
-$JOINEACH tskid TSK.ID_LIST ",\n"$
-	$TAB${$SPC$
-$		// ã¿ã¹ã¯å±æ§ï¼æ¡å¼µæ
-å ±ï¼èµ·åçªå°ï¼èµ·åæåªå
-åº¦
-		($TSK.TSKATR[tskid]$),$SPC$
-		(intptr_t)($TSK.EXINF[tskid]$),$SPC$
-		(TASK)($TSK.TASK[tskid]$),$SPC$
-		INT_PRIORITY($TSK.ITSKPRI[tskid]$),$SPC$
-
-$		// ã¿ã¹ã¯åæåã³ã³ãã­ã¹ããã­ãã¯ï¼ã¹ã¿ãã¯é å
-		$IF USE_TSKINICTXB$
-			$GENERATE_TSKINICTXB(tskid)$
-		$ELSE$
-			$TSK.TINIB_STKSZ[tskid]$, $TSK.TINIB_STK[tskid]$
-		$END$$SPC$
-	}$END$$NL$
-};$NL$
-$NL$
-
-$
-$  åççæã¿ã¹ã¯ç¨ã®ã¿ã¹ã¯åæåãã­ãã¯ã®çæ
-$
-$IF num_atskid > 0$
-	TINIB _kernel_atinib_table[$num_atskid$];$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(TINIB, _kernel_atinib_table);$NL$
-$END$$NL$
-
-$
-$  ã¿ã¹ã¯çæé åºãã¼ãã«ã®çæ
-$
-const ID _kernel_torder_table[TNUM_STSKID] = {$NL$
-$TAB$$JOINEACH tskid TSK.ORDER_LIST ", "$$tskid$$END$$NL$
-};$NL$
-$NL$
-
-$
-$  ã¿ã¹ã¯ç®¡çãã­ãã¯ã®çæ
-$
-TCB _kernel_tcb_table[TNUM_TSKID];$NL$
-$NL$
-
-$
-$  ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«åæåé¢æ°
-$
-$initfuncs = "_kernel_initialize_task();"$
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/task.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/task.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/task.trb	(revision 306)
@@ -0,0 +1,135 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: task.trb 668 2016-03-03 13:57:53Z ertl-hiro $
+# 
+
+#
+#		ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«ã®çæã¹ã¯ãªãã
+#
+
+class TaskObject < KernelObject
+  def initialize()
+    super("tsk", "task", "t")
+  end
+
+  def prepare(key, params)
+    # ãã©ã¡ã¼ã¿ãçç¥ãããæã®ããã©ã«ãå¤ã®è¨­å®
+    params[:stk] ||= "NULL"
+
+    # tskatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1028ï¼½
+    #ï¼TA_ACTï¼TA_NOACTQUEï¼TARGET_TSKATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+    if (params[:tskatr] & ~($TA_ACT|$TA_NOACTQUE|$TARGET_TSKATR)) != 0
+      error_illegal_id("E_RSATR", params, :tskatr, :tskid)
+    end
+
+    # (TMIN_TPRI <= itskpri && itskpri <= TMAX_TPRI)ã§ãªãå ´åï¼»NGKI1034ï¼½
+    if !($TMIN_TPRI <= params[:itskpri] && params[:itskpri] <= $TMAX_TPRI)
+      error_illegal_id("E_PAR", params, :itskpri, :tskid)
+    end
+
+    # stkszãã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_STKSZï¼æªå®ç¾©ã®å ´åã¯1ï¼
+    # ãããå°ããå ´åï¼»NGKI1042ï¼½
+    if params[:stksz] < $TARGET_MIN_STKSZ
+      error_wrong_id("E_PAR", params, :stksz, :tskid, "too small")
+    end
+
+    # ã¹ã¿ãã¯é åã®è¨­å®ï¼»NGKI1041ï¼½
+    if params[:stk] == "NULL"
+      # ã¹ã¿ãã¯é åã®çæï¼»NGKI1049ï¼½
+      stkName = "_kernel_stack_#{params[:tskid]}"
+      params[:tinib_stksz] = AllocStack(stkName, params[:stksz])
+      params[:tinib_stk] = stkName
+    else
+      # stkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´åï¼»NGKI1056ï¼½
+      if (params[:stksz] & ($CHECK_STKSZ_ALIGN - 1)) != 0
+        error_wrong_id("E_PAR", params, :stksz, :tskid, "not aligned")
+      end
+
+      params[:tinib_stksz] = params[:stksz]
+      params[:tinib_stk] = "(void *)(#{params[:stk]})"
+    end
+  end
+
+  def generateInib(key, params)
+    if $USE_TSKINICTXB
+      tskinictxb = GenerateTskinictxb(key, params)
+    else
+      tskinictxb = "#{params[:tinib_stksz]}, #{params[:tinib_stk]}"
+    end
+    return("(#{params[:tskatr]}), (intptr_t)(#{params[:exinf]}), " \
+			"(TASK)(#{params[:task]}), INT_PRIORITY(#{params[:itskpri]}), " \
+			+ tskinictxb)
+  end
+end
+
+#
+#  ã¿ã¹ã¯ç®¡çã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Task Management Functions")
+if $cfgData[:CRE_TSK].size() == 0
+  error("no task is registered")
+end
+TaskObject.new.generate()
+
+# ã¿ã¹ã¯çæé åºãã¼ãã«ã®çæ
+$kernelCfgC.add("const ID _kernel_torder_table[TNUM_STSKID] = { ")
+$kernelCfgC.append("\t")
+$cfgData[:CRE_TSK].each_with_index do |(key, params), index|
+  $kernelCfgC.append(", ") if index > 0
+  $kernelCfgC.append("#{params[:tskid]}")
+end
+$kernelCfgC.add
+$kernelCfgC.add2("};")
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/task_manage.c
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/task_manage.c	(revision 302)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/task_manage.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: task_manage.c 470 2015-12-30 09:50:36Z ertl-hiro $
+ *  $Id: task_manage.c 717 2016-03-31 07:03:53Z ertl-hiro $
  */
 
@@ -135,4 +135,9 @@
 /*
  *  ã¿ã¹ã¯ã®çæ
+ *
+ *  pk_ctsk->exinfã¯ï¼ã¨ã©ã¼ãã§ãã¯ãããï¼ä¸åº¦ããåç
+§ããªãããï¼ã­ã¼
+ *  ã«ã«å¤æ°ã«ã³ãã¼ããå¿
+è¦ããªãï¼éä¸­ã§æ¸ãæãã£ã¦ãæ¯éããªãï¼ï¼
  */
 #ifdef TOPPERS_acre_tsk
@@ -148,20 +153,28 @@
 	TINIB	*p_tinib;
 	ATR		tskatr;
-	void	*stk;
+	TASK	task;
+	PRI		itskpri;
+	size_t	stksz;
+	STK_T	*stk;
 	ER		ercd;
 
 	LOG_ACRE_TSK_ENTER(pk_ctsk);
 	CHECK_TSKCTX_UNL();
-	CHECK_RSATR(pk_ctsk->tskatr, TA_ACT|TARGET_TSKATR);
-	CHECK_PAR(FUNC_ALIGN(pk_ctsk->task));
-	CHECK_PAR(FUNC_NONNULL(pk_ctsk->task));
-	CHECK_PAR(VALID_TPRI(pk_ctsk->itskpri));
-	CHECK_PAR(pk_ctsk->stksz >= TARGET_MIN_STKSZ);
-	if (pk_ctsk->stk != NULL) {
-		CHECK_PAR(STKSZ_ALIGN(pk_ctsk->stksz));
-		CHECK_PAR(STACK_ALIGN(pk_ctsk->stk));
-	}
+
 	tskatr = pk_ctsk->tskatr;
+	task = pk_ctsk->task;
+	itskpri = pk_ctsk->itskpri;
+	stksz = pk_ctsk->stksz;
 	stk = pk_ctsk->stk;
+
+	CHECK_RSATR(tskatr, TA_ACT|TA_NOACTQUE|TARGET_TSKATR);
+	CHECK_PAR(FUNC_ALIGN(task));
+	CHECK_PAR(FUNC_NONNULL(task));
+	CHECK_PAR(VALID_TPRI(itskpri));
+	CHECK_PAR(stksz >= TARGET_MIN_STKSZ);
+	if (stk != NULL) {
+		CHECK_PAR(STKSZ_ALIGN(stksz));
+		CHECK_PAR(STACK_ALIGN(stk));
+	}
 
 	lock_cpu();
@@ -171,5 +184,5 @@
 	else {
 		if (stk == NULL) {
-			stk = kernel_malloc(ROUND_STK_T(pk_ctsk->stksz));
+			stk = kernel_malloc(ROUND_STK_T(stksz));
 			tskatr |= TA_MEMALLOC;
 		}
@@ -182,10 +195,10 @@
 			p_tinib->tskatr = tskatr;
 			p_tinib->exinf = pk_ctsk->exinf;
-			p_tinib->task = pk_ctsk->task;
-			p_tinib->ipriority = INT_PRIORITY(pk_ctsk->itskpri);
+			p_tinib->task = task;
+			p_tinib->ipriority = INT_PRIORITY(itskpri);
 #ifdef USE_TSKINICTXB
-			init_tskinictxb(&(p_tinib->tskinictxb), stk, pk_ctsk);
+			init_tskinictxb(&(p_tinib->tskinictxb), stksz, stk);
 #else /* USE_TSKINICTXB */
-			p_tinib->stksz = pk_ctsk->stksz;
+			p_tinib->stksz = stksz;
 			p_tinib->stk = stk;
 #endif /* USE_TSKINICTXB */
Index: asp3_wo_tecs/trunk/extension/dcre/kernel/time_manage.c
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/kernel/time_manage.c	(revision 302)
+++ asp3_wo_tecs/trunk/extension/dcre/kernel/time_manage.c	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: time_manage.c 463 2015-10-18 14:25:55Z ertl-hiro $
+ *  $Id: time_manage.c 542 2016-01-16 04:42:51Z ertl-hiro $
  */
 
@@ -333,5 +333,7 @@
 		break;
 	case TNFY_INCVAR:
+		(void) loc_cpu();
 		*(p_nfyinfo->nfy.incvar.p_var) += 1;
+		(void) unl_cpu();
 		ercd = E_OK;
 		break;
@@ -364,5 +366,7 @@
 			break;
 		case TENFY_INCVAR:
+			(void) loc_cpu();
 			*(p_nfyinfo->enfy.incvar.p_var) += 1;
+			(void) unl_cpu();
 			break;
 		case TENFY_ACTTSK:
Index: asp3_wo_tecs/trunk/extension/dcre/sample/sample1.c
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/sample/sample1.c	(revision 302)
+++ asp3_wo_tecs/trunk/extension/dcre/sample/sample1.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2004-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2004-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: sample1.c 333 2015-06-21 13:23:37Z ertl-hiro $
+ *  $Id: sample1.c 725 2016-04-02 21:50:49Z ertl-hiro $
  */
 
@@ -241,4 +241,19 @@
 
 /*
+ *  å²è¾¼ã¿ãã³ãã©
+ */
+#ifdef INTNO1
+
+void intno1_isr(intptr_t exinf)
+{
+	intno1_clear();
+	SVC_PERROR(rot_rdq(HIGH_PRIORITY));
+	SVC_PERROR(rot_rdq(MID_PRIORITY));
+	SVC_PERROR(rot_rdq(LOW_PRIORITY));
+}
+
+#endif /* INTNO1 */
+
+/*
  *  CPUä¾å¤ãã³ãã©
  */
@@ -268,6 +283,13 @@
 	}
 
+#ifdef PREPARE_RETURN_CPUEXC
+	PREPARE_RETURN_CPUEXC;
 	SVC_PERROR(get_tid(&cpuexc_tskid));
 	SVC_PERROR(act_tsk(EXC_TASK));
+#else /* PREPARE_RETURN_CPUEXC */
+	syslog(LOG_NOTICE, "Sample program ends with exception.");
+	SVC_PERROR(ext_ker());
+	assert(0);
+#endif /* PREPARE_RETURN_CPUEXC */
 }
 
Index: asp3_wo_tecs/trunk/extension/dcre/sample/sample1.cfg
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/sample/sample1.cfg	(revision 302)
+++ asp3_wo_tecs/trunk/extension/dcre/sample/sample1.cfg	(revision 306)
@@ -1,14 +1,8 @@
 /*
- *  $Id: sample1.cfg 333 2015-06-21 13:23:37Z ertl-hiro $
+ *		ãµã³ãã«ãã­ã°ã©ã (1)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ *
+ *  $Id: sample1.cfg 725 2016-04-02 21:50:49Z ertl-hiro $
  */
-
-/*
- *  ãµã³ãã«ãã­ã°ã©ã (1)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
- */
-INCLUDE("target_timer.cfg");
-INCLUDE("syssvc/syslog.cfg");
-INCLUDE("syssvc/banner.cfg");
-INCLUDE("syssvc/serial.cfg");
-INCLUDE("syssvc/logtask.cfg");
+INCLUDE("tecsgen.cfg");
 
 #include "sample1.h"
@@ -20,4 +14,8 @@
 CRE_CYC(CYCHDR1, { TA_NULL, { TNFY_HANDLER, 0, cyclic_handler }, 2000000, 0 });
 AID_ALM(1);
+#ifdef INTNO1
+CFG_INT(INTNO1, { INTNO1_INTATR, INTNO1_INTPRI });
+CRE_ISR(INTNO1_ISR, { TA_NULL, 0, INTNO1, intno1_isr, 1 });
+#endif /* INTNO1 */
 #ifdef CPUEXC1
 DEF_EXC(CPUEXC1, { TA_NULL, cpuexc_handler });
Index: asp3_wo_tecs/trunk/extension/dcre/sample/sample1.h
===================================================================
--- asp3_wo_tecs/trunk/extension/dcre/sample/sample1.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/dcre/sample/sample1.h	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2004-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2004-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  *
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  *
- *  $Id: sample1.h 410 2015-08-03 21:54:44Z ertl-hiro $
+ *  $Id: sample1.h 725 2016-04-02 21:50:49Z ertl-hiro $
  */
 
@@ -112,4 +112,7 @@
 extern void	main_task(intptr_t exinf);
 extern void exc_task(intptr_t exinf);
+#ifdef INTNO1
+extern void intno1_isr(intptr_t exinf);
+#endif /* INTNO1 */
 #ifdef CPUEXC1
 extern void	cpuexc_handler(void *p_excinf);
Index: asp3_wo_tecs/trunk/extension/drift/include/kernel.h
===================================================================
--- asp3_wo_tecs/trunk/extension/drift/include/kernel.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/drift/include/kernel.h	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: kernel.h 463 2015-10-18 14:25:55Z ertl-hiro $
+ *  $Id: kernel.h 654 2016-02-20 12:59:31Z ertl-hiro $
  */
 
@@ -550,6 +550,6 @@
 #define TKERNEL_MAKER	UINT_C(0x0118)	/* ã«ã¼ãã«ã®ã¡ã¼ã«ã¼ã³ã¼ã */
 #define TKERNEL_PRID	UINT_C(0x0007)	/* ã«ã¼ãã«ã®è­å¥çªå· */
-#define TKERNEL_SPVER	UINT_C(0xf630)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
-#define TKERNEL_PRVER	UINT_C(0x30b0)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_SPVER	UINT_C(0xf631)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_PRVER	UINT_C(0x3010)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
 
 /*
Index: asp3_wo_tecs/trunk/extension/drift/kernel/Makefile.kernel
===================================================================
--- asp3_wo_tecs/trunk/extension/drift/kernel/Makefile.kernel	(revision 302)
+++ asp3_wo_tecs/trunk/extension/drift/kernel/Makefile.kernel	(revision 306)
@@ -6,5 +6,5 @@
 #  Copyright (C) 2003 by Embedded and Real-Time Systems Laboratory
 #                              Toyohashi Univ. of Technology, JAPAN
-#  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+#  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
 #              Graduate School of Information Science, Nagoya Univ., JAPAN
 # 
@@ -53,5 +53,5 @@
 #  ã®è²¬ä»»ãè² ããªãï¼
 # 
-#  $Id: Makefile.kernel 236 2014-09-28 16:24:33Z ertl-hiro $
+#  $Id: Makefile.kernel 554 2016-01-17 13:21:59Z ertl-hiro $
 # 
 
@@ -132,23 +132,23 @@
 #  çæããããªãã¸ã§ã¯ããã¡ã¤ã«ã®ä¾å­é¢ä¿ã®å®ç¾©
 #
-$(startup) $(startup:.o=.s) $(startup:.o=.d): startup.c
-$(task) $(task:.o=.s) $(task:.o=.d): task.c
-$(taskhook) $(taskhook:.o=.s) $(taskhook:.o=.d): taskhook.c
-$(wait) $(wait:.o=.s) $(wait:.o=.d): wait.c
-$(time_event) $(time_event:.o=.s) $(time_event:.o=.d): time_event.c
-$(task_manage) $(task_manage:.o=.s) $(task_manage:.o=.d): task_manage.c
-$(task_refer) $(task_refer:.o=.s) $(task_refer:.o=.d): task_refer.c
-$(task_sync) $(task_sync:.o=.s) $(task_sync:.o=.d): task_sync.c
-$(task_term) $(task_term:.o=.s) $(task_term:.o=.d): task_term.c
-$(semaphore) $(semaphore:.o=.s) $(semaphore:.o=.d): semaphore.c
-$(eventflag) $(eventflag:.o=.s) $(eventflag:.o=.d): eventflag.c
-$(dataqueue) $(dataqueue:.o=.s) $(dataqueue:.o=.d): dataqueue.c
-$(pridataq) $(pridataq:.o=.s) $(pridataq:.o=.d): pridataq.c
-$(mutex) $(mutex:.o=.s) $(mutex:.o=.d): mutex.c
-$(mempfix) $(mempfix:.o=.s) $(mempfix:.o=.d): mempfix.c
-$(time_manage) $(time_manage:.o=.s) $(time_manage:.o=.d): time_manage.c
-$(cyclic) $(cyclic:.o=.s) $(cyclic:.o=.d): cyclic.c
-$(alarm) $(alarm:.o=.s) $(alarm:.o=.d): alarm.c
-$(sys_manage) $(sys_manage:.o=.s) $(sys_manage:.o=.d): sys_manage.c
-$(interrupt) $(interrupt:.o=.s) $(interrupt:.o=.d): interrupt.c
-$(exception) $(exception:.o=.s) $(exception:.o=.d): exception.c
+$(startup) $(startup:.o=.s): startup.c
+$(task) $(task:.o=.s): task.c
+$(taskhook) $(taskhook:.o=.s): taskhook.c
+$(wait) $(wait:.o=.s): wait.c
+$(time_event) $(time_event:.o=.s): time_event.c
+$(task_manage) $(task_manage:.o=.s): task_manage.c
+$(task_refer) $(task_refer:.o=.s): task_refer.c
+$(task_sync) $(task_sync:.o=.s): task_sync.c
+$(task_term) $(task_term:.o=.s): task_term.c
+$(semaphore) $(semaphore:.o=.s): semaphore.c
+$(eventflag) $(eventflag:.o=.s): eventflag.c
+$(dataqueue) $(dataqueue:.o=.s): dataqueue.c
+$(pridataq) $(pridataq:.o=.s): pridataq.c
+$(mutex) $(mutex:.o=.s): mutex.c
+$(mempfix) $(mempfix:.o=.s): mempfix.c
+$(time_manage) $(time_manage:.o=.s): time_manage.c
+$(cyclic) $(cyclic:.o=.s): cyclic.c
+$(alarm) $(alarm:.o=.s): alarm.c
+$(sys_manage) $(sys_manage:.o=.s): sys_manage.c
+$(interrupt) $(interrupt:.o=.s): interrupt.c
+$(exception) $(exception:.o=.s): exception.c
Index: asp3_wo_tecs/trunk/extension/drift/kernel/kernel_rename.h
===================================================================
--- asp3_wo_tecs/trunk/extension/drift/kernel/kernel_rename.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/drift/kernel/kernel_rename.h	(revision 306)
@@ -188,192 +188,4 @@
 
 
-#ifdef TOPPERS_LABEL_ASM
-
-/*
- *  startup.c
- */
-#define _kerflg						__kernel_kerflg
-#define _exit_kernel				__kernel_exit_kernel
-
-/*
- *  task.c
- */
-#define _p_runtsk					__kernel_p_runtsk
-#define _p_schedtsk					__kernel_p_schedtsk
-#define _enadsp						__kernel_enadsp
-#define _dspflg						__kernel_dspflg
-#define _ready_queue				__kernel_ready_queue
-#define _ready_primap				__kernel_ready_primap
-#define _initialize_task			__kernel_initialize_task
-#define _search_schedtsk			__kernel_search_schedtsk
-#define _make_runnable				__kernel_make_runnable
-#define _make_non_runnable			__kernel_make_non_runnable
-#define _make_dormant				__kernel_make_dormant
-#define _make_active				__kernel_make_active
-#define _change_priority			__kernel_change_priority
-#define _rotate_ready_queue			__kernel_rotate_ready_queue
-#define _task_terminate				__kernel_task_terminate
-
-/*
- *  taskhook.c
- */
-#define _mtxhook_check_ceilpri		__kernel_mtxhook_check_ceilpri
-#define _mtxhook_scan_ceilmtx		__kernel_mtxhook_scan_ceilmtx
-#define _mtxhook_release_all		__kernel_mtxhook_release_all
-
-/*
- *  wait.c
- */
-#define _make_wait_tmout			__kernel_make_wait_tmout
-#define _wait_complete				__kernel_wait_complete
-#define _wait_tmout					__kernel_wait_tmout
-#define _wait_tmout_ok				__kernel_wait_tmout_ok
-#define _wobj_make_wait				__kernel_wobj_make_wait
-#define _wobj_make_wait_tmout		__kernel_wobj_make_wait_tmout
-#define _init_wait_queue			__kernel_init_wait_queue
-
-/*
- *  time_event.c
- */
-#define _boundary_evttim			__kernel_boundary_evttim
-#define _current_evttim				__kernel_current_evttim
-#define _current_evttim_frac		__kernel_current_evttim_frac
-#define _current_hrtcnt				__kernel_current_hrtcnt
-#define _monotonic_evttim			__kernel_monotonic_evttim
-#define _drift_rate					__kernel_drift_rate
-#define _evttim_step				__kernel_evttim_step
-#define _evttim_step_frac			__kernel_evttim_step_frac
-#define _systim_offset				__kernel_systim_offset
-#define _in_signal_time				__kernel_in_signal_time
-#define _initialize_tmevt			__kernel_initialize_tmevt
-#define _tmevt_up					__kernel_tmevt_up
-#define _tmevt_down					__kernel_tmevt_down
-#define _update_current_evttim		__kernel_update_current_evttim
-#define _set_hrt_event				__kernel_set_hrt_event
-#define _tmevtb_register			__kernel_tmevtb_register
-#define _tmevtb_enqueue				__kernel_tmevtb_enqueue
-#define _tmevtb_dequeue				__kernel_tmevtb_dequeue
-#define _check_adjtim				__kernel_check_adjtim
-#define _tmevt_lefttim				__kernel_tmevt_lefttim
-#define _signal_time				__kernel_signal_time
-
-/*
- *  semaphore.c
- */
-#define _initialize_semaphore		__kernel_initialize_semaphore
-
-/*
- *  eventflag.c
- */
-#define _initialize_eventflag		__kernel_initialize_eventflag
-#define _check_flg_cond				__kernel_check_flg_cond
-
-/*
- *  dataqueue.c
- */
-#define _initialize_dataqueue		__kernel_initialize_dataqueue
-#define _enqueue_data				__kernel_enqueue_data
-#define _force_enqueue_data			__kernel_force_enqueue_data
-#define _dequeue_data				__kernel_dequeue_data
-#define _send_data					__kernel_send_data
-#define _force_send_data			__kernel_force_send_data
-#define _receive_data				__kernel_receive_data
-
-/*
- *  pridataq.c
- */
-#define _initialize_pridataq		__kernel_initialize_pridataq
-#define _enqueue_pridata			__kernel_enqueue_pridata
-#define _dequeue_pridata			__kernel_dequeue_pridata
-#define _send_pridata				__kernel_send_pridata
-#define _receive_pridata			__kernel_receive_pridata
-
-/*
- *  mutex.c
- */
-#define _initialize_mutex			__kernel_initialize_mutex
-#define _mutex_check_ceilpri		__kernel_mutex_check_ceilpri
-#define _mutex_scan_ceilmtx			__kernel_mutex_scan_ceilmtx
-#define _mutex_drop_priority		__kernel_mutex_drop_priority
-#define _mutex_acquire				__kernel_mutex_acquire
-#define _mutex_release				__kernel_mutex_release
-#define _mutex_release_all			__kernel_mutex_release_all
-
-/*
- *  mempfix.c
- */
-#define _initialize_mempfix			__kernel_initialize_mempfix
-#define _get_mpf_block				__kernel_get_mpf_block
-
-/*
- *  cyclic.c
- */
-#define _initialize_cyclic			__kernel_initialize_cyclic
-#define _call_cyclic				__kernel_call_cyclic
-
-/*
- *  alarm.c
- */
-#define _initialize_alarm			__kernel_initialize_alarm
-#define _call_alarm					__kernel_call_alarm
-
-/*
- *  interrupt.c
- */
-#define _initialize_interrupt		__kernel_initialize_interrupt
-
-/*
- *  exception.c
- */
-#define _initialize_exception		__kernel_initialize_exception
-
-/*
- *  kernel_cfg.c
- */
-#define _initialize_object			__kernel_initialize_object
-#define _call_inirtn				__kernel_call_inirtn
-#define _call_terrtn				__kernel_call_terrtn
-#define _tmax_tskid					__kernel_tmax_tskid
-#define _tinib_table				__kernel_tinib_table
-#define _torder_table				__kernel_torder_table
-#define _tcb_table					__kernel_tcb_table
-#define _tmax_semid					__kernel_tmax_semid
-#define _seminib_table				__kernel_seminib_table
-#define _semcb_table				__kernel_semcb_table
-#define _tmax_flgid					__kernel_tmax_flgid
-#define _flginib_table				__kernel_flginib_table
-#define _flgcb_table				__kernel_flgcb_table
-#define _tmax_dtqid					__kernel_tmax_dtqid
-#define _dtqinib_table				__kernel_dtqinib_table
-#define _dtqcb_table				__kernel_dtqcb_table
-#define _tmax_pdqid					__kernel_tmax_pdqid
-#define _pdqinib_table				__kernel_pdqinib_table
-#define _pdqcb_table				__kernel_pdqcb_table
-#define _tmax_mtxid					__kernel_tmax_mtxid
-#define _mtxinib_table				__kernel_mtxinib_table
-#define _mtxcb_table				__kernel_mtxcb_table
-#define _tmax_mpfid					__kernel_tmax_mpfid
-#define _mpfinib_table				__kernel_mpfinib_table
-#define _mpfcb_table				__kernel_mpfcb_table
-#define _tmax_cycid					__kernel_tmax_cycid
-#define _cycinib_table				__kernel_cycinib_table
-#define _cyccb_table				__kernel_cyccb_table
-#define _tmax_almid					__kernel_tmax_almid
-#define _alminib_table				__kernel_alminib_table
-#define _almcb_table				__kernel_almcb_table
-#define _tnum_def_inhno				__kernel_tnum_def_inhno
-#define _inhinib_table				__kernel_inhinib_table
-#define _tnum_cfg_intno				__kernel_tnum_cfg_intno
-#define _intinib_table				__kernel_intinib_table
-#define _tnum_def_excno				__kernel_tnum_def_excno
-#define _excinib_table				__kernel_excinib_table
-#define _tmevt_heap					__kernel_tmevt_heap
-#define _istksz						__kernel_istksz
-#define _istk						__kernel_istk
-#define _istkpt						__kernel_istkpt
-
-
-#endif /* TOPPERS_LABEL_ASM */
-
 #include "target_rename.h"
 
Index: asp3_wo_tecs/trunk/extension/drift/kernel/kernel_unrename.h
===================================================================
--- asp3_wo_tecs/trunk/extension/drift/kernel/kernel_unrename.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/drift/kernel/kernel_unrename.h	(revision 306)
@@ -189,192 +189,4 @@
 
 
-#ifdef TOPPERS_LABEL_ASM
-
-/*
- *  startup.c
- */
-#undef _kerflg
-#undef _exit_kernel
-
-/*
- *  task.c
- */
-#undef _p_runtsk
-#undef _p_schedtsk
-#undef _enadsp
-#undef _dspflg
-#undef _ready_queue
-#undef _ready_primap
-#undef _initialize_task
-#undef _search_schedtsk
-#undef _make_runnable
-#undef _make_non_runnable
-#undef _make_dormant
-#undef _make_active
-#undef _change_priority
-#undef _rotate_ready_queue
-#undef _task_terminate
-
-/*
- *  taskhook.c
- */
-#undef _mtxhook_check_ceilpri
-#undef _mtxhook_scan_ceilmtx
-#undef _mtxhook_release_all
-
-/*
- *  wait.c
- */
-#undef _make_wait_tmout
-#undef _wait_complete
-#undef _wait_tmout
-#undef _wait_tmout_ok
-#undef _wobj_make_wait
-#undef _wobj_make_wait_tmout
-#undef _init_wait_queue
-
-/*
- *  time_event.c
- */
-#undef _boundary_evttim
-#undef _current_evttim
-#undef _current_evttim_frac
-#undef _current_hrtcnt
-#undef _monotonic_evttim
-#undef _drift_rate
-#undef _evttim_step
-#undef _evttim_step_frac
-#undef _systim_offset
-#undef _in_signal_time
-#undef _initialize_tmevt
-#undef _tmevt_up
-#undef _tmevt_down
-#undef _update_current_evttim
-#undef _set_hrt_event
-#undef _tmevtb_register
-#undef _tmevtb_enqueue
-#undef _tmevtb_dequeue
-#undef _check_adjtim
-#undef _tmevt_lefttim
-#undef _signal_time
-
-/*
- *  semaphore.c
- */
-#undef _initialize_semaphore
-
-/*
- *  eventflag.c
- */
-#undef _initialize_eventflag
-#undef _check_flg_cond
-
-/*
- *  dataqueue.c
- */
-#undef _initialize_dataqueue
-#undef _enqueue_data
-#undef _force_enqueue_data
-#undef _dequeue_data
-#undef _send_data
-#undef _force_send_data
-#undef _receive_data
-
-/*
- *  pridataq.c
- */
-#undef _initialize_pridataq
-#undef _enqueue_pridata
-#undef _dequeue_pridata
-#undef _send_pridata
-#undef _receive_pridata
-
-/*
- *  mutex.c
- */
-#undef _initialize_mutex
-#undef _mutex_check_ceilpri
-#undef _mutex_scan_ceilmtx
-#undef _mutex_drop_priority
-#undef _mutex_acquire
-#undef _mutex_release
-#undef _mutex_release_all
-
-/*
- *  mempfix.c
- */
-#undef _initialize_mempfix
-#undef _get_mpf_block
-
-/*
- *  cyclic.c
- */
-#undef _initialize_cyclic
-#undef _call_cyclic
-
-/*
- *  alarm.c
- */
-#undef _initialize_alarm
-#undef _call_alarm
-
-/*
- *  interrupt.c
- */
-#undef _initialize_interrupt
-
-/*
- *  exception.c
- */
-#undef _initialize_exception
-
-/*
- *  kernel_cfg.c
- */
-#undef _initialize_object
-#undef _call_inirtn
-#undef _call_terrtn
-#undef _tmax_tskid
-#undef _tinib_table
-#undef _torder_table
-#undef _tcb_table
-#undef _tmax_semid
-#undef _seminib_table
-#undef _semcb_table
-#undef _tmax_flgid
-#undef _flginib_table
-#undef _flgcb_table
-#undef _tmax_dtqid
-#undef _dtqinib_table
-#undef _dtqcb_table
-#undef _tmax_pdqid
-#undef _pdqinib_table
-#undef _pdqcb_table
-#undef _tmax_mtxid
-#undef _mtxinib_table
-#undef _mtxcb_table
-#undef _tmax_mpfid
-#undef _mpfinib_table
-#undef _mpfcb_table
-#undef _tmax_cycid
-#undef _cycinib_table
-#undef _cyccb_table
-#undef _tmax_almid
-#undef _alminib_table
-#undef _almcb_table
-#undef _tnum_def_inhno
-#undef _inhinib_table
-#undef _tnum_cfg_intno
-#undef _intinib_table
-#undef _tnum_def_excno
-#undef _excinib_table
-#undef _tmevt_heap
-#undef _istksz
-#undef _istk
-#undef _istkpt
-
-
-#endif /* TOPPERS_LABEL_ASM */
-
 #include "target_unrename.h"
 
Index: asp3_wo_tecs/trunk/extension/drift/kernel/time_event.c
===================================================================
--- asp3_wo_tecs/trunk/extension/drift/kernel/time_event.c	(revision 302)
+++ asp3_wo_tecs/trunk/extension/drift/kernel/time_event.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: time_event.c 451 2015-08-14 15:29:07Z ertl-hiro $
+ *  $Id: time_event.c 532 2016-01-15 14:48:04Z ertl-hiro $
  */
 
@@ -85,22 +85,9 @@
 /*
  *  ã¿ã¤ã ã¤ãã³ããã¼ãæä½ãã¯ã­
- *
- *  PARENTã¨CHILDã®ç´ ç´ãªå®ç¾©ã¯æ¬¡ã®éãã§ãããï¼ããå®è¡å¹çã®è¯ããã¯
- *  ã­å®ç¾©ã¨ãã¦ããï¼
- *  #define PARENT(p_tmevtn) (tmevt_heap + (((p_tmevtn) - tmevt_heap) >> 1))
- *  #define LCHILD(p_tmevtn) (tmevt_heap + (((p_tmevtn) - tmevt_heap) << 1))
- *
- *  ä¸ã®PARENTã®å®ç¾©ã¯ï¼TMEVTNã®é
-åãï¼sizeof(TMEVTN)ã®åä½ã§ã¢ã©ã¤ã³
- *  ããã¦ãããã¨ãæ³å®ãã¦ããï¼ãã®åæãæç«ããªãå ´åã¯ï¼ä¸ã®å®ç¾©
- *  ãä½¿ç¨ããå¿
-è¦ãããï¼
- */
-#define PARENT(p_tmevtn)				/* è¦ªãã¼ããæ±ãã */		\
-		((TMEVTN *)(((((uintptr_t) tmevt_heap)						\
-				+ ((uintptr_t)(p_tmevtn))) >> 1) & ~(sizeof(TMEVTN) - 1)))
-#define LCHILD(p_tmevtn)				/* å·¦ã®å­ãã¼ããæ±ãã */	\
-		((TMEVTN *)((((uintptr_t)(p_tmevtn)) << 1) - ((uintptr_t) tmevt_heap)))
-
+ */
+#define PARENT(p_tmevtn)	(tmevt_heap + (((p_tmevtn) - tmevt_heap) >> 1))
+													/* è¦ªãã¼ããæ±ãã */
+#define LCHILD(p_tmevtn)	(tmevt_heap + (((p_tmevtn) - tmevt_heap) << 1))
+													/* å·¦ã®å­ãã¼ããæ±ãã */
 /*
  *  ã¿ã¤ã ã¤ãã³ããã¼ãä¸­ã®å
Index: asp3_wo_tecs/trunk/extension/drift/test/hrt_drift1.cfg
===================================================================
--- asp3_wo_tecs/trunk/extension/drift/test/hrt_drift1.cfg	(revision 302)
+++ asp3_wo_tecs/trunk/extension/drift/test/hrt_drift1.cfg	(revision 306)
@@ -2,10 +2,7 @@
  *		ããªããèª¿æ´æ©è½ã®ãã¹ã(1)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
  *
- *  $Id: hrt_drift1.cfg 327 2015-06-21 06:42:01Z ertl-hiro $
+ *  $Id: hrt_drift1.cfg 572 2016-02-01 14:40:09Z ertl-hiro $
  */
-INCLUDE("target_timer.cfg");
-INCLUDE("syssvc/syslog.cfg");
-INCLUDE("syssvc/banner.cfg");
-INCLUDE("syssvc/serial.cfg");
+INCLUDE("tecsgen.cfg");
 
 #include "hrt_drift1.h"
Index: asp3_wo_tecs/trunk/extension/messagebuf/include/kernel.h
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/include/kernel.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/messagebuf/include/kernel.h	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: kernel.h 463 2015-10-18 14:25:55Z ertl-hiro $
+ *  $Id: kernel.h 654 2016-02-20 12:59:31Z ertl-hiro $
  */
 
@@ -577,6 +577,6 @@
 #define TKERNEL_MAKER	UINT_C(0x0118)	/* ã«ã¼ãã«ã®ã¡ã¼ã«ã¼ã³ã¼ã */
 #define TKERNEL_PRID	UINT_C(0x0007)	/* ã«ã¼ãã«ã®è­å¥çªå· */
-#define TKERNEL_SPVER	UINT_C(0xf630)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
-#define TKERNEL_PRVER	UINT_C(0x30b0)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_SPVER	UINT_C(0xf631)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_PRVER	UINT_C(0x3010)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
 
 /*
Index: asp3_wo_tecs/trunk/extension/messagebuf/kernel/Makefile.kernel
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/kernel/Makefile.kernel	(revision 302)
+++ asp3_wo_tecs/trunk/extension/messagebuf/kernel/Makefile.kernel	(revision 306)
@@ -6,5 +6,5 @@
 #  Copyright (C) 2003 by Embedded and Real-Time Systems Laboratory
 #                              Toyohashi Univ. of Technology, JAPAN
-#  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+#  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
 #              Graduate School of Information Science, Nagoya Univ., JAPAN
 # 
@@ -53,5 +53,5 @@
 #  ã®è²¬ä»»ãè² ããªãï¼
 # 
-#  $Id: Makefile.kernel 236 2014-09-28 16:24:33Z ertl-hiro $
+#  $Id: Makefile.kernel 554 2016-01-17 13:21:59Z ertl-hiro $
 # 
 
@@ -137,24 +137,24 @@
 #  çæããããªãã¸ã§ã¯ããã¡ã¤ã«ã®ä¾å­é¢ä¿ã®å®ç¾©
 #
-$(startup) $(startup:.o=.s) $(startup:.o=.d): startup.c
-$(task) $(task:.o=.s) $(task:.o=.d): task.c
-$(taskhook) $(taskhook:.o=.s) $(taskhook:.o=.d): taskhook.c
-$(wait) $(wait:.o=.s) $(wait:.o=.d): wait.c
-$(time_event) $(time_event:.o=.s) $(time_event:.o=.d): time_event.c
-$(task_manage) $(task_manage:.o=.s) $(task_manage:.o=.d): task_manage.c
-$(task_refer) $(task_refer:.o=.s) $(task_refer:.o=.d): task_refer.c
-$(task_sync) $(task_sync:.o=.s) $(task_sync:.o=.d): task_sync.c
-$(task_term) $(task_term:.o=.s) $(task_term:.o=.d): task_term.c
-$(semaphore) $(semaphore:.o=.s) $(semaphore:.o=.d): semaphore.c
-$(eventflag) $(eventflag:.o=.s) $(eventflag:.o=.d): eventflag.c
-$(dataqueue) $(dataqueue:.o=.s) $(dataqueue:.o=.d): dataqueue.c
-$(pridataq) $(pridataq:.o=.s) $(pridataq:.o=.d): pridataq.c
-$(mutex) $(mutex:.o=.s) $(mutex:.o=.d): mutex.c
-$(messagebuf) $(messagebuf:.o=.s) $(messagebuf:.o=.d): messagebuf.c
-$(mempfix) $(mempfix:.o=.s) $(mempfix:.o=.d): mempfix.c
-$(time_manage) $(time_manage:.o=.s) $(time_manage:.o=.d): time_manage.c
-$(cyclic) $(cyclic:.o=.s) $(cyclic:.o=.d): cyclic.c
-$(alarm) $(alarm:.o=.s) $(alarm:.o=.d): alarm.c
-$(sys_manage) $(sys_manage:.o=.s) $(sys_manage:.o=.d): sys_manage.c
-$(interrupt) $(interrupt:.o=.s) $(interrupt:.o=.d): interrupt.c
-$(exception) $(exception:.o=.s) $(exception:.o=.d): exception.c
+$(startup) $(startup:.o=.s): startup.c
+$(task) $(task:.o=.s): task.c
+$(taskhook) $(taskhook:.o=.s): taskhook.c
+$(wait) $(wait:.o=.s): wait.c
+$(time_event) $(time_event:.o=.s): time_event.c
+$(task_manage) $(task_manage:.o=.s): task_manage.c
+$(task_refer) $(task_refer:.o=.s): task_refer.c
+$(task_sync) $(task_sync:.o=.s): task_sync.c
+$(task_term) $(task_term:.o=.s): task_term.c
+$(semaphore) $(semaphore:.o=.s): semaphore.c
+$(eventflag) $(eventflag:.o=.s): eventflag.c
+$(dataqueue) $(dataqueue:.o=.s): dataqueue.c
+$(pridataq) $(pridataq:.o=.s): pridataq.c
+$(mutex) $(mutex:.o=.s): mutex.c
+$(messagebuf) $(messagebuf:.o=.s): messagebuf.c
+$(mempfix) $(mempfix:.o=.s): mempfix.c
+$(time_manage) $(time_manage:.o=.s): time_manage.c
+$(cyclic) $(cyclic:.o=.s): cyclic.c
+$(alarm) $(alarm:.o=.s): alarm.c
+$(sys_manage) $(sys_manage:.o=.s): sys_manage.c
+$(interrupt) $(interrupt:.o=.s): interrupt.c
+$(exception) $(exception:.o=.s): exception.c
Index: asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel.tf	(revision 302)
+++ 	(revision )
@@ -1,430 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2015 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: kernel.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  kernel_cfg.hã®å
-é ­é¨åã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-/* kernel_cfg.h */$NL$
-#ifndef TOPPERS_KERNEL_CFG_H$NL$
-#define TOPPERS_KERNEL_CFG_H$NL$
-
-$
-$  kernel_cfg.cã®å
-é ­é¨åã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/* kernel_cfg.c */$NL$
-#include "kernel/kernel_int.h"$NL$
-#include "kernel_cfg.h"$NL$
-$NL$
-
-#if !(TKERNEL_PRID == 0x0007U && (TKERNEL_PRVER & 0xf000U) == 0x3000U)$NL$
-#error The kernel does not match this configuration file.$NL$
-#endif$NL$
-$NL$
-
-$ 
-$  ã¤ã³ã¯ã«ã¼ããã£ã¬ã¯ãã£ãï¼#includeï¼
-$ 
-/*$NL$
-$SPC$*  Include Directives (#include)$NL$
-$SPC$*/$NL$
-$NL$
-$INCLUDES$
-$NL$
-
-$
-$  ã¹ã¿ãã¯é åã®ç¢ºä¿é¢æ°
-$
-$IF !ISFUNCTION("ALLOC_STACK")$
-$FUNCTION ALLOC_STACK$
-$	// å¤§ããæ¹ã«ä¸¸ãããµã¤ãºã§ç¢ºä¿ããï¼»NGKI1050ï¼½ï¼»NGKI3220ï¼½
-	static STK_T $ARGV[1]$[COUNT_STK_T($ARGV[2]$)];$NL$
-	$RESULT = FORMAT("ROUND_STK_T(%1%)", ARGV[2])$
-$END$
-$END$
-
-$
-$  éç¥ãã³ãã©ã®çæé¢æ°
-$
-$FUNCTION GENERATE_NFYHDR$
-$	// ãã©ã¡ã¼ã¿ãå¤æ°ã«æ ¼ç´
-	$nfymode = ARGV[1]$
-	$nfymode1 = nfymode & 0x0f$
-	$nfymode2 = nfymode & ~0x0f$
-	$par1 = ARGV[2]$
-	$par2 = ARGV[3]$
-	$text_line = ARGV[6]$
-	$objid = ARGV[7]$
-	$apiname = ARGV[8]$
-
-$	// éç¥å¦çã®ãã©ã¡ã¼ã¿æ°ã«ããè£æ­£å¦ç
-	$IF nfymode == TNFY_HANDLER || nfymode1 == TNFY_SETVAR
-								|| nfymode1 == TNFY_SETFLG
-								|| nfymode1 == TNFY_SNDDTQ$
-$		// éç¥å¦çã®ãã©ã¡ã¼ã¿ã2ã¤ã®å ´å
-		$numpar = 2$
-		$epar1 = ARGV[4]$
-		$epar2 = ARGV[5]$
-	$ELSE$
-$		// éç¥å¦çã®ãã©ã¡ã¼ã¿ã1ã¤ã®å ´å
-		$numpar = 1$
-		$epar1 = ARGV[3]$
-		$epar2 = ARGV[4]$
-	$END$
-
-$	// ãã©ã¡ã¼ã¿æ°ã®ãã§ãã¯
-	$IF (numpar == 2 && !LENGTH(par2))
-					|| (nfymode2 != 0 && !LENGTH(epar1))
-					|| (nfymode2 == TENFY_SETFLG && !LENGTH(epar2))$
-$		// ãã©ã¡ã¼ã¿ãè¶³ããªãå ´å
-		$ERROR text_line$
-			$FORMAT(_("too few parameters for %1% `%2%\' of `%3%\' in %4%"),
-										"nfymode", nfymode, objid, apiname)$
-		$END$
-	$ELIF (nfymode2 == 0 && LENGTH(epar1))
-					|| (nfymode2 != TENFY_SETFLG && LENGTH(epar2))$
-$		// ãã©ã¡ã¼ã¿ãå¤ãããå ´å
-		$ERROR text_line$
-			$FORMAT(_("too many parameters for %1% `%2%\' of `%3%\' in %4%"),
-										"nfymode", nfymode, objid, apiname)$
-		$END$
-	$ELIF nfymode == TNFY_HANDLER$
-$		// ã¿ã¤ã ã¤ãã³ããã³ãã©ã®å¼åºã
-		$funcname = FORMAT("(NFYHDR)(%s)", par2)$
-	$ELSE$
-$		// éç¥ãã³ãã©ã®é¢æ°å
-		$funcname = CONCAT("_kernel_nfyhdr_", objid)$
-
-$		// ã¨ã©ã¼éç¥ã®ããã®å¤æ°ã®ã¢ãã¬ã¹ã¨ãªãã¸ã§ã¯ãIDãæ ¼ç´ãã
-$		// å¤æ°ã®çæï¼ã¨ã©ã¼ãã§ãã¯ã®ããã«å¿
-è¦ï¼
-		$IF nfymode2 == TENFY_SETVAR ||  nfymode2 == TENFY_INCVAR$
-			intptr_t *const $funcname$_p_evar =
-			$SPC$(intptr_t *)($epar1$);$NL$$NL$
-		$ELIF nfymode2 == TENFY_ACTTSK || nfymode2 == TENFY_WUPTSK$
-			const ID $funcname$_etskid = $epar1$;$NL$$NL$
-		$ELIF nfymode2 == TENFY_SIGSEM$
-			const ID $funcname$_esemid = $epar1$;$NL$$NL$
-		$ELIF nfymode2 == TENFY_SETFLG$
-			const ID $funcname$_eflgid = $epar1$;$NL$$NL$
-		$ELIF nfymode2 == TENFY_SNDDTQ$
-			const ID $funcname$_edtqid = $epar1$;$NL$$NL$
-		$END$
-
-$		// é¢æ°ã®å
-é ­é¨åã®çæ
-		static void$NL$
-		$funcname$(intptr_t exinf)$NL$
-		{$NL$
-
-		$IF nfymode2 == 0$
-$			// ã¨ã©ã¼éç¥ããªãå ´å
-			$error_code = "(void) "$
-		$ELSE$
-$			// ã¨ã©ã¼éç¥ãããå ´å
-			$TAB$ER		ercd;$NL$
-			$NL$
-			$error_code = "ercd = "$
-		$END$
-
-$		// ã¤ãã³ãéç¥å¦çã®å¦ç
-		$IF nfymode1 == TNFY_SETVAR && nfymode2 == 0$
-$			// å¤æ°ã®è¨­å®
-			$TAB$*((intptr_t *) exinf) = ($par2$);$NL$
-		$ELIF nfymode1 == TNFY_INCVAR && nfymode2 == 0$
-$			// å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã
-			$TAB$*((intptr_t *) exinf) += 1;$NL$
-		$ELIF nfymode1 == TNFY_ACTTSK$
-$			// ã¿ã¹ã¯ã®èµ·å
-			$TAB$$error_code$act_tsk((ID) exinf);$NL$
-		$ELIF nfymode1 == TNFY_WUPTSK$
-$			// ã¿ã¹ã¯ã®èµ·åº
-			$TAB$$error_code$wup_tsk((ID) exinf);$NL$
-		$ELIF nfymode1 == TNFY_SIGSEM$
-$			// ã»ããã©ã®è¿å´
-			$TAB$$error_code$sig_sem((ID) exinf);$NL$
-		$ELIF nfymode1 == TNFY_SETFLG$
-$			// ã¤ãã³ããã©ã°ã®ã»ãã
-			$TAB$$error_code$set_flg(((ID) exinf), $par2$);$NL$
-		$ELIF nfymode1 == TNFY_SNDDTQ$
-$			// ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
-			$TAB$$error_code$psnd_dtq(((ID) exinf), $par2$);$NL$
-		$ELSE$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-									"nfymode", nfymode, objid, apiname)$
-			$END$
-		$END$
-
-		$IF nfymode2 != 0$
-$			// ã¨ã©ã¼éç¥å¦çã®å¦ç
-			$TAB$if (ercd != E_OK) {$NL$
-
-			$IF nfymode2 == TENFY_SETVAR$
-$				// å¤æ°ã®è¨­å®
-				$TAB$$TAB$*$funcname$_p_evar = (intptr_t) ercd;$NL$
-			$ELIF nfymode2 == TENFY_INCVAR$
-$				// å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã
-				$TAB$$TAB$*$funcname$_p_evar += 1;$NL$
-			$ELIF nfymode2 == TENFY_ACTTSK$
-$				// ã¿ã¹ã¯ã®èµ·å
-				$TAB$$TAB$(void) act_tsk($funcname$_etskid);$NL$
-			$ELIF nfymode2 == TENFY_WUPTSK$
-$				// ã¿ã¹ã¯ã®èµ·åº
-				$TAB$$TAB$(void) wup_tsk($funcname$_etskid);$NL$
-			$ELIF nfymode2 == TENFY_SIGSEM$
-$				// ã»ããã©ã®è¿å´
-				$TAB$$TAB$(void) sig_sem($funcname$_esemid);$NL$
-			$ELIF nfymode2 == TENFY_SETFLG$
-$				// ã¤ãã³ããã©ã°ã®ã»ãã
-				$TAB$$TAB$(void) set_flg($funcname$_eflgid, $epar2$);$NL$
-			$ELIF nfymode2 == TENFY_SNDDTQ$
-$				// ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
-				$TAB$$TAB$(void) psnd_dtq
-								($funcname$_edtqid, (intptr_t) ercd);$NL$
-			$ELSE$
-				$ERROR text_line$E_PAR:$SPC$
-					$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"nfymode", nfymode, objid, apiname)$
-				$END$
-			$END$
-
-			$TAB$}$NL$
-		$END$
-
-$		// é¢æ°ã®æ«å°¾é¨åã®çæ
-		}$NL$
-		$NL$
-	$END$
-	$RESULT = funcname$
-$END$
-
-$
-$  åæ©è½ã¢ã¸ã¥ã¼ã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³
-$
-$INCLUDE "kernel/task.tf"$
-$INCLUDE "kernel/semaphore.tf"$
-$INCLUDE "kernel/eventflag.tf"$
-$INCLUDE "kernel/dataqueue.tf"$
-$INCLUDE "kernel/pridataq.tf"$
-$INCLUDE "kernel/mutex.tf"$
-$INCLUDE "kernel/messagebuf.tf"$
-$INCLUDE "kernel/mempfix.tf"$
-$INCLUDE "kernel/cyclic.tf"$
-$INCLUDE "kernel/alarm.tf"$
-$INCLUDE "kernel/interrupt.tf"$
-$INCLUDE "kernel/exception.tf"$
-
-$ 
-$  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é å
-$ 
-/*$NL$
-$SPC$*  Stack Area for Non-task Context$NL$
-$SPC$*/$NL$
-$NL$
-
-$IF !LENGTH(ICS.ORDER_LIST)$
-$	// DEF_ICSããªãå ´åã®ããã©ã«ãå¤ã®è¨­å®
-	#ifdef DEFAULT_ISTK$NL$
-	$NL$
-	#define TOPPERS_ISTKSZ		DEFAULT_ISTKSZ$NL$
-	#define TOPPERS_ISTK		DEFAULT_ISTK$NL$
-	$NL$
-	#else /* DEAULT_ISTK */$NL$
-	$NL$
-	$istksz = ALLOC_STACK("_kernel_istack", "DEFAULT_ISTKSZ")$$NL$
-	#define TOPPERS_ISTKSZ		$istksz$$NL$
-	#define TOPPERS_ISTK		_kernel_istack$NL$
-	$NL$
-	#endif /* DEAULT_ISTK */$NL$
-$ELSE$
-
-$	// éçAPIãDEF_ICSããè¤æ°ããï¼E_OBJï¼ï¼»NGKI3216ï¼½
-	$IF LENGTH(ICS.ORDER_LIST) > 1$
-		$ERROR$E_OBJ: $FORMAT(_("too many %1%"), "DEF_ICS")$$END$
-	$END$
-
-$	// istkszã0ä»¥ä¸ãï¼ã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_ISTKSZï¼ããã
-$	// å°ããå ´åï¼E_PARï¼ï¼»NGKI3254ï¼½
-	$IF ICS.ISTKSZ[1] <= 0 || (TARGET_MIN_ISTKSZ
-									&& ICS.ISTKSZ[1] < TARGET_MIN_ISTKSZ)$
-		$ERROR ICS.TEXT_LINE[1]$E_PAR:$SPC$
-			$FORMAT(_("too small %1% `%2%\' in %3%"),
-						"istksz", ICS.ISTKSZ[1], "DEF_ICS")$
-		$END$
-	$END$
-
-$ 	// istkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼ï¼»NGKI3222ï¼½
-	$IF !EQ(ICS.ISTK[1], "NULL") && CHECK_STKSZ_ALIGN
-							&& (ICS.ISTKSZ[1] & (CHECK_STKSZ_ALIGN - 1))$
-		$ERROR ICS.TEXT_LINE[1]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' in %3% is not aligned"),
-						"istksz", ICS.ISTKSZ[1], "DEF_ICS")$
-		$END$
-	$END$
-
-	$IF EQ(ICS.ISTK[1], "NULL")$
-$		// ã¹ã¿ãã¯é åã®èªåå²ä»ã
-		$istksz = ALLOC_STACK("_kernel_istack", ICS.ISTKSZ[1])$$NL$
-		#define TOPPERS_ISTKSZ		$istksz$$NL$
-		#define TOPPERS_ISTK		_kernel_istack$NL$
-	$ELSE$
-		#define TOPPERS_ISTKSZ		($ICS.ISTKSZ[1]$)$NL$
-		#define TOPPERS_ISTK		(void *)($ICS.ISTK[1]$)$NL$
-	$END$
-$END$
-$NL$
-
-$ éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é å
-const size_t	_kernel_istksz = TOPPERS_ISTKSZ;$NL$
-STK_T *const	_kernel_istk = TOPPERS_ISTK;$NL$
-$NL$
-#ifdef TOPPERS_ISTKPT$NL$
-STK_T *const	_kernel_istkpt = TOPPERS_ISTKPT(TOPPERS_ISTK, TOPPERS_ISTKSZ);$NL$
-#endif /* TOPPERS_ISTKPT */$NL$
-$NL$
-
-$ 
-$  ã¿ã¤ã ã¤ãã³ãç®¡ç
-$ 
-/*$NL$
-$SPC$*  Time Event Management$NL$
-$SPC$*/$NL$
-$NL$
-TMEVTN   _kernel_tmevt_heap[1 + TNUM_TSKID + TNUM_CYCID + TNUM_ALMID];$NL$
-$NL$
-
-$ 
-$  åã¢ã¸ã¥ã¼ã«ã®åæåé¢æ°
-$ 
-/*$NL$
-$SPC$*  Module Initialization Function$NL$
-$SPC$*/$NL$
-$NL$
-void$NL$
-_kernel_initialize_object(void)$NL$
-{$NL$
-$FOREACH func (initfuncs)$
-	$TAB$$func$$NL$
-$END$
-}$NL$
-$NL$
-
-$ 
-$  åæåã«ã¼ãã³ã®å®è¡é¢æ°
-$ 
-/*$NL$
-$SPC$*  Initialization Routine$NL$
-$SPC$*/$NL$
-$NL$
-void$NL$
-_kernel_call_inirtn(void)$NL$
-{$NL$
-$FOREACH order INI.ORDER_LIST$
-$ 	// iniatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3241ï¼½
-$	//ï¼TA_NULLã§ãªãå ´åï¼
-	$IF INI.INIATR[order] != 0$
-		$ERROR INI.TEXT_LINE[order]$E_RSATR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of %3% `%4%\' in %5%"),
-						"iniatr", INI.INIATR[order], "inirtn",
-						INI.INIRTN[order], "ATT_INI")$
-		$END$
-	$END$
-	$TAB$((INIRTN)($INI.INIRTN[order]$))((intptr_t)($INI.EXINF[order]$));$NL$
-$END$
-}$NL$
-$NL$
-
-$ 
-$  çµäºå¦çã«ã¼ãã³ã®å®è¡é¢æ°
-$ 
-/*$NL$
-$SPC$*  Termination Routine$NL$
-$SPC$*/$NL$
-$NL$
-void$NL$
-_kernel_call_terrtn(void)$NL$
-{$NL$
-$FOREACH rorder TER.RORDER_LIST$
-$ 	// teratrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3248ï¼½
-$	//ï¼TA_NULLã§ãªãå ´åï¼
-	$IF TER.TERATR[rorder] != 0$
-		$ERROR TER.TEXT_LINE[rorder]$E_RSATR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of %3% `%4%\' in %5%"),
-						"teratr", TER.TERATR[rorder], "terrtn",
-						TER.TERRTN[rorder], "ATT_TER")$
-		$END$
-	$END$
-	$TAB$((TERRTN)($TER.TERRTN[rorder]$))((intptr_t)($TER.EXINF[rorder]$));$NL$
-$END$
-}$NL$
-$NL$
-
-$
-$  kernel_cfg.hã®æ«å°¾é¨åã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#endif /* TOPPERS_KERNEL_CFG_H */$NL$
Index: asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel.trb	(revision 306)
@@ -0,0 +1,491 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: kernel.trb 670 2016-03-03 15:08:11Z ertl-hiro $
+# 
+
+#
+#		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2ã®çæã¹ã¯ãªãã
+#
+
+#
+#  ã¿ã¤ã ã¹ã¿ã³ããã¡ã¤ã«ã®æå®
+#
+$timeStampFileName = "kernel_cfg.timestamp"
+
+#
+#  kernel_cfg.hã®å
+é ­é¨åã®çæ
+#
+$kernelCfgH = GenFile.new("kernel_cfg.h")
+$kernelCfgH.add(<<EOS)
+/* kernel_cfg.h */
+#ifndef TOPPERS_KERNEL_CFG_H
+#define TOPPERS_KERNEL_CFG_H
+EOS
+
+#
+#  kernel_cfg.cã®å
+é ­é¨åã®çæ
+#
+$kernelCfgC = GenFile.new("kernel_cfg.c")
+$kernelCfgC.add(<<EOS)
+/* kernel_cfg.c */
+#include "kernel/kernel_int.h"
+#include "kernel_cfg.h"
+
+#if !(TKERNEL_PRID == 0x0007U && (TKERNEL_PRVER & 0xf000U) == 0x3000U)
+#error The kernel does not match this configuration file.
+#endif
+EOS
+
+#
+#  ã¤ã³ã¯ã«ã¼ããã£ã¬ã¯ãã£ãï¼#includeï¼
+#
+$kernelCfgC.comment_header("Include Directives")
+$includeFiles.each do |file|
+  $kernelCfgC.add("#include #{file}")
+end
+$kernelCfgC.add()
+
+#
+#  ã¹ã¿ãã¯é åã®ç¢ºä¿é¢æ°
+#
+#  ã¹ã¿ãã¯é åã®å®ç¾©åã¨ï¼ã¹ã¿ãã¯é åã®ãµã¤ãºè¨è¿°ãé
+åã§è¿ãï¼
+#
+unless defined? AllocStack()
+  def AllocStack(stack, size)
+    # å¤§ããæ¹ã«ä¸¸ãããµã¤ãºã§ç¢ºä¿ããï¼»NGKI1050ï¼½ï¼»NGKI3220ï¼½
+    $kernelCfgC.add("static STK_T #{stack}[COUNT_STK_T(#{size})];")
+    return("ROUND_STK_T(#{size})")
+  end
+end
+
+#
+#  ã«ã¼ãã«ãªãã¸ã§ã¯ãã«é¢ããæ
+å ±ã®çæï¼ä»®æ³ã¯ã©ã¹ï¼
+#
+class KernelObject
+  def initialize(obj, object, obj_s = obj)
+    @obj = obj
+    @OBJ = obj.tr("a-z", "A-Z")
+    @object = object
+    @obj_s = obj_s
+    @OBJ_S = obj_s.tr("a-z", "A-Z")
+    @objid = (obj + "id").to_sym
+    @api = "CRE_#{@OBJ}".to_sym
+  end
+
+  def generate()
+    # kernel_cfg.hã®çæ
+    $kernelCfgH.add("#define TNUM_#{@OBJ}ID\t#{$cfgData[@api].size}")
+
+    # ãªãã¸ã§ã¯ãã®IDçªå·ã®ãã¯ã­å®ç¾©ã®çæ
+    $cfgData[@api].sort.each do |key, params|
+      $kernelCfgH.add("#define #{params[@objid]}\t#{params[@objid].val}")
+    end
+    $kernelCfgH.add()
+
+    # ãªãã¸ã§ã¯ãã®IDçªå·ãä¿æããå¤æ°
+    if $USE_EXTERNAL_ID
+      $cfgData[@api].sort.each do |key, params|
+        $kernelCfgC.add("const ID #{params[@objid]}_id" \
+										" = #{params[@objid].val};")
+      end
+      $kernelCfgC.add()
+    end
+
+    # ãªãã¸ã§ã¯ãIDçªå·ã®æå¤§å¤
+    $kernelCfgC.add2("const ID _kernel_tmax_#{@obj}id" \
+							" = (TMIN_#{@OBJ}ID + TNUM_#{@OBJ}ID - 1);")
+
+    # ãã¼ã¿æ§é 
+    if $cfgData[@api].size > 0
+      # äºåæºåï¼ã¨ã©ã¼ãã§ãã¯ï¼ã¡ã¢ãªé åã®çæï¼
+      $cfgData[@api].sort.each do |key, params|
+        prepare(key, params)
+      end
+
+      # ãªãã¸ã§ã¯ãå
+¨ä½ã«å¯¾ãã¦å¿
+è¦ãªã¡ã¢ãªé åã®çæï¼ãªãã·ã§ã³ï¼
+      if respond_to?(:generateData)
+        generateData()
+      end
+
+      # ãªãã¸ã§ã¯ãåæåãã­ãã¯ã®çæ
+      $kernelCfgC.add("const #{@OBJ_S}INIB _kernel_#{@obj_s}inib_table" \
+													"[TNUM_#{@OBJ}ID] = {")
+      $cfgData[@api].sort.each_with_index do |(key, params), index|
+        $kernelCfgC.add(",") if index > 0
+        $kernelCfgC.append("\t{ " + generateInib(key, params) + " }")
+      end
+      $kernelCfgC.add
+      $kernelCfgC.add2("};")
+
+      # ãªãã¸ã§ã¯ãç®¡çãã­ãã¯ã®çæ
+      $kernelCfgC.add2("#{@OBJ_S}CB _kernel_#{@obj_s}cb_table" \
+													"[TNUM_#{@OBJ}ID];")
+
+      # ãªãã¸ã§ã¯ãåæåé¢æ°ã®è¿½å 
+      $initializeFunctions.push("_kernel_initialize_#{@object}();")
+    else
+      # ãªãã¸ã§ã¯ãã1ã¤ããªãå ´å
+      $kernelCfgC.add("TOPPERS_EMPTY_LABEL(const #{@OBJ_S}INIB, " \
+										"_kernel_#{@obj_s}inib_table);")
+      $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(#{@OBJ_S}CB, " \
+										"_kernel_#{@obj_s}cb_table);")
+    end
+  end
+end
+
+#
+#  éç¥ãã³ãã©ã®çæé¢æ°
+#
+def generateNotifyHandler(key, params, objid)
+  # ãã©ã¡ã¼ã¿ãå¤æ°ã«æ ¼ç´
+  nfymode = params[:nfymode]
+  nfymode1 = nfymode & 0x0f
+  nfymode2 = nfymode & ~0x0f
+  par1 = params[:par1]
+  par2 = params[:par2]
+
+  # éç¥å¦çã®ãã©ã¡ã¼ã¿æ°ã«ããè£æ­£å¦ç
+  if nfymode == $TNFY_HANDLER || nfymode1 == $TNFY_SETVAR \
+								|| nfymode1 == $TNFY_SETFLG \
+								|| nfymode1 == $TNFY_SNDDTQ
+    # éç¥å¦çã®ãã©ã¡ã¼ã¿ã2ã¤ã®å ´å
+	numpar = 2
+	epar1 = params[:par3]
+	epar2 = params[:par4]
+  else
+    # éç¥å¦çã®ãã©ã¡ã¼ã¿ã1ã¤ã®å ´å
+    numpar = 1
+    epar1 = params[:par2]
+    epar2 = params[:par3]
+  end
+
+  # ãã©ã¡ã¼ã¿æ°ã®ãã§ãã¯
+  if (numpar == 2 && par2.nil?) || (nfymode2 != 0 && epar1.nil?) \
+								|| (nfymode2 == $TENFY_SETFLG && epar2.nil?)
+    # ãã©ã¡ã¼ã¿ãè¶³ããªãå ´å
+    error_api(params, "too few parameters for nfymode `#{nfymode}' " \
+											"in %apiname of %#{objid}")
+  elsif (nfymode2 == 0 && !epar1.nil?) \
+					|| (nfymode2 != $TENFY_SETFLG && !epar2.nil?)
+    # ãã©ã¡ã¼ã¿ãå¤ãããå ´å
+    error_api(params, "too many parameters for nfymode `#{nfymode}' " \
+											"in %apiname of %#{objid}")
+  elsif nfymode == $TNFY_HANDLER
+    # ã¿ã¤ã ã¤ãã³ããã³ãã©ã®å¼åºã
+    funcname = "(NFYHDR)(#{par2})"
+  else
+    # éç¥ãã³ãã©ã®é¢æ°å
+    funcname = "_kernel_nfyhdr_#{params[objid]}"
+
+    # ã¨ã©ã¼éç¥ã®ããã®å¤æ°ã®ã¢ãã¬ã¹ã¨ãªãã¸ã§ã¯ãIDãæ ¼ç´ãã
+    # å¤æ°ã®çæï¼ã¨ã©ã¼ãã§ãã¯ã®ããã«å¿
+è¦ï¼
+    if nfymode2 == $TENFY_SETVAR || nfymode2 == $TENFY_INCVAR
+      $kernelCfgC.add2("intptr_t *const #{funcname}_p_evar =" \
+											" (intptr_t *)(#{epar1});")
+    elsif nfymode2 == $TENFY_ACTTSK || nfymode2 == $TENFY_WUPTSK
+      $kernelCfgC.add2("const ID #{funcname}_etskid = #{epar1};")
+    elsif nfymode2 == $TENFY_SIGSEM
+      $kernelCfgC.add2("const ID #{funcname}_esemid = #{epar1};")
+    elsif nfymode2 == $TENFY_SETFLG
+      $kernelCfgC.add2("const ID #{funcname}_eflgid = #{epar1};")
+    elsif nfymode2 == $TENFY_SNDDTQ
+      $kernelCfgC.add2("const ID #{funcname}_edtqid = #{epar1};")
+    end
+
+    # é¢æ°ã®å
+é ­é¨åã®çæ
+    $kernelCfgC.add("static void")
+    $kernelCfgC.add("#{funcname}(intptr_t exinf)")
+    $kernelCfgC.add("{")
+
+    if nfymode2 == 0
+      # ã¨ã©ã¼éç¥ããªãå ´å
+      errorCode = "(void) "
+    else
+      # ã¨ã©ã¼éç¥ãããå ´å
+      $kernelCfgC.add2("\tER\tercd;")
+      errorCode = "ercd = "
+    end
+
+    # ã¤ãã³ãéç¥å¦çã®å¦ç
+    if nfymode1 == $TNFY_SETVAR && nfymode2 == 0
+      # å¤æ°ã®è¨­å®
+      $kernelCfgC.add("\t*((intptr_t *) exinf) = (#{par2});")
+    elsif nfymode1 == $TNFY_INCVAR && nfymode2 == 0
+      # å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã
+      $kernelCfgC.add("\t(void) loc_cpu();")
+      $kernelCfgC.add("\t*((intptr_t *) exinf) += 1;")
+      $kernelCfgC.add("\t(void) unl_cpu();")
+    elsif nfymode1 == $TNFY_ACTTSK
+      # ã¿ã¹ã¯ã®èµ·å
+      $kernelCfgC.add("\t#{errorCode}act_tsk((ID) exinf);")
+    elsif nfymode1 == $TNFY_WUPTSK
+      # ã¿ã¹ã¯ã®èµ·åº
+      $kernelCfgC.add("\t#{errorCode}wup_tsk((ID) exinf);")
+    elsif nfymode1 == $TNFY_SIGSEM
+      # ã»ããã©ã®è¿å´
+      $kernelCfgC.add("\t#{errorCode}sig_sem((ID) exinf);")
+    elsif nfymode1 == $TNFY_SETFLG
+      # ã¤ãã³ããã©ã°ã®ã»ãã
+      $kernelCfgC.add("\t#{errorCode}set_flg(((ID) exinf), #{par2});")
+    elsif nfymode1 == $TNFY_SNDDTQ
+      # ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
+      $kernelCfgC.add("\t#{errorCode}psnd_dtq(((ID) exinf), #{par2});")
+    else
+      error_illegal_id("E_PAR", params, :nfymode, objid)
+    end
+			
+    if nfymode2 != 0
+      # ã¨ã©ã¼éç¥å¦çã®å¦ç
+      $kernelCfgC.add("\tif (ercd != E_OK) {")
+
+
+      if nfymode2 == $TENFY_SETVAR
+        # å¤æ°ã®è¨­å®
+        $kernelCfgC.add("\t\t*#{funcname}_p_evar = (intptr_t) ercd;")
+      elsif nfymode2 == $TENFY_INCVAR
+        # å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã
+        $kernelCfgC.add("\t\t(void) loc_cpu();")
+        $kernelCfgC.add("\t\t*#{funcname}_p_evar += 1;")
+        $kernelCfgC.add("\t\t(void) unl_cpu();")
+      elsif nfymode2 == $TENFY_ACTTSK
+        # ã¿ã¹ã¯ã®èµ·å
+        $kernelCfgC.add("\t\t(void) act_tsk(#{funcname}_etskid);")
+      elsif nfymode2 == $TENFY_WUPTSK
+        # ã¿ã¹ã¯ã®èµ·åº
+        $kernelCfgC.add("\t\t(void) wup_tsk(#{funcname}_etskid);")
+      elsif nfymode2 == $TENFY_SIGSEM
+        # ã»ããã©ã®è¿å´
+        $kernelCfgC.add("\t\t(void) sig_sem(#{funcname}_esemid);")
+      elsif nfymode2 == $TENFY_SETFLG
+        # ã¤ãã³ããã©ã°ã®ã»ãã
+        $kernelCfgC.add("\t\t(void) set_flg(#{funcname}_eflgid, #{epar2});")
+      elsif nfymode2 == $TENFY_SNDDTQ
+        # ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
+        $kernelCfgC.add("\t\t(void) psnd_dtq(#{funcname}_edtqid," \
+													" (intptr_t) ercd);")
+      else
+        error_illegal_id("E_PAR", params, :nfymode, objid)
+      end
+      $kernelCfgC.add("\t}")
+    end
+
+    # é¢æ°ã®æ«å°¾é¨åã®çæ
+    $kernelCfgC.add2("}")
+  end
+  return(funcname)
+end
+
+#
+#  åæ©è½ã¢ã¸ã¥ã¼ã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³
+#
+$initializeFunctions = []
+IncludeTrb("kernel/task.trb")
+IncludeTrb("kernel/semaphore.trb")
+IncludeTrb("kernel/eventflag.trb")
+IncludeTrb("kernel/dataqueue.trb")
+IncludeTrb("kernel/pridataq.trb")
+IncludeTrb("kernel/mutex.trb")
+IncludeTrb("kernel/messagebuf.trb")
+IncludeTrb("kernel/mempfix.trb")
+IncludeTrb("kernel/cyclic.trb")
+IncludeTrb("kernel/alarm.trb")
+IncludeTrb("kernel/interrupt.trb")
+IncludeTrb("kernel/exception.trb")
+
+#
+#  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é å
+#
+$kernelCfgC.comment_header("Stack Area for Non-task Context")
+
+if $cfgData[:DEF_ICS].size == 0
+  # DEF_ICSããªãå ´åã®ããã©ã«ãå¤ã®è¨­å®
+  if $DEFAULT_ISTK.nil?
+    # ã¹ã¿ãã¯é åã®èªåå²ä»ã
+    istksz = AllocStack("_kernel_istack", "DEFAULT_ISTKSZ")
+    istk = "_kernel_istack"
+  else
+    istksz = "DEFAULT_ISTKSZ"
+    istk = "DEFAULT_ISTK"
+  end
+else
+  # éçAPIãDEF_ICSããè¤æ°ããï¼E_OBJï¼ï¼»NGKI3216ï¼½
+  if $cfgData[:DEF_ICS].size > 1
+    error("E_OBJ: too many DEF_ICS")
+  end
+
+  # DEF_ICSãããå ´åã®å¦ç
+  params = $cfgData[:DEF_ICS][1]
+
+  # ãã©ã¡ã¼ã¿ãçç¥ãããæã®ããã©ã«ãå¤ã®è¨­å®
+  params[:istk] ||= "NULL"
+
+  # istkszãã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_ISTKSZï¼æªå®ç¾©ã®å ´åã¯1ï¼
+  # ãããå°ããå ´åï¼E_PARï¼ï¼»NGKI3254ï¼½
+  if params[:istksz] < $TARGET_MIN_ISTKSZ
+    error_wrong("E_PAR", params, :istksz, "too small")
+  end
+
+  if params[:istk] == "NULL"
+    # ã¹ã¿ãã¯é åã®èªåå²ä»ã
+    istksz = AllocStack("_kernel_istack", params[:istksz])
+    istk = "_kernel_istack"
+  else
+    # istkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼ï¼»NGKI3222ï¼½
+    if (params[:istksz] & ($CHECK_STKSZ_ALIGN - 1)) != 0
+      error_wrong("E_PAR", params, :istksz, "not aligned")
+    end
+
+    istksz = "(#{params[:istksz]})"
+    istk = "(void *)(#{params[:istk]})"
+  end
+end
+
+$kernelCfgC.add(<<EOS)
+const size_t _kernel_istksz = #{istksz};
+STK_T *const _kernel_istk = #{istk};
+
+#ifdef TOPPERS_ISTKPT
+STK_T *const _kernel_istkpt = TOPPERS_ISTKPT(#{istk}, #{istksz});
+#endif /* TOPPERS_ISTKPT */
+EOS
+
+#
+#  ã¿ã¤ã ã¤ãã³ãç®¡ç
+#
+$kernelCfgC.comment_header("Time Event Management")
+$kernelCfgC.add(<<EOS)
+TMEVTN   _kernel_tmevt_heap[1 + TNUM_TSKID + TNUM_CYCID + TNUM_ALMID];
+EOS
+
+#
+#  åã¢ã¸ã¥ã¼ã«ã®åæåé¢æ°
+#
+$kernelCfgC.comment_header("Module Initialization Function")
+$kernelCfgC.append(<<EOS)
+void
+_kernel_initialize_object(void)
+{
+EOS
+$initializeFunctions.each do |func|
+  $kernelCfgC.add("\t#{func}")
+end
+$kernelCfgC.add2("}")
+
+#
+#  åæåã«ã¼ãã³æ©è½
+#
+$kernelCfgC.comment_header("Initialization Routine")
+
+# ã¨ã©ã¼ãã§ãã¯
+$cfgData[:ATT_INI].each do |key, params|
+  # iniatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3241ï¼½
+  #ï¼TA_NULLã§ãªãå ´åï¼
+  if (params[:iniatr] != $TA_NULL)
+    error_illegal_sym("E_RSATR", params, :iniatr, :inirtn)
+  end
+end
+
+# åæåã«ã¼ãã³ã®å®è¡é¢æ°ã®çæ
+$kernelCfgC.append(<<EOS)
+void
+_kernel_call_inirtn(void)
+{
+EOS
+$cfgData[:ATT_INI].each do |key, params|
+  $kernelCfgC.add("\t((INIRTN)(#{params[:inirtn]}))" \
+								"((intptr_t)(#{params[:exinf]}));")
+end
+$kernelCfgC.add2("}")
+
+#
+#  çµäºå¦çã«ã¼ãã³æ©è½
+#
+$kernelCfgC.comment_header("Termination Routine")
+
+# ã¨ã©ã¼ãã§ãã¯
+$cfgData[:ATT_TER].each do |key, params|
+  # teratrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3248ï¼½
+  #ï¼TA_NULLã§ãªãå ´åï¼
+  if (params[:teratr] != $TA_NULL)
+    error_illegal_sym("E_RSATR", params, :teratr, :terrtn)
+  end
+end
+
+# çµäºå¦çã«ã¼ãã³ã®å®è¡é¢æ°ã®çæ
+$kernelCfgC.append(<<EOS)
+void
+_kernel_call_terrtn(void)
+{
+EOS
+$cfgData[:ATT_TER].reverse_each do |key, params|
+  $kernelCfgC.add("\t((TERRTN)(#{params[:terrtn]}))" \
+								"((intptr_t)(#{params[:exinf]}));")
+end
+$kernelCfgC.add2("}")
+
+#
+#  kernel_cfg.hã®æ«å°¾é¨åã®çæ
+#
+$kernelCfgH.append(<<EOS)
+#endif /* TOPPERS_KERNEL_CFG_H */
+EOS
Index: asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_api.csv
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_api.csv	(revision 302)
+++ 	(revision )
@@ -1,17 +1,0 @@
-tsk,CRE_TSK,#tskid { .tskatr &exinf &task +itskpri .stksz &stk },,
-sem,CRE_SEM,#semid { .sematr .isemcnt .maxsem },,
-flg,CRE_FLG,#flgid { .flgatr .iflgptn },,
-dtq,CRE_DTQ,#dtqid { .dtqatr .dtqcnt &dtqmb },,
-pdq,CRE_PDQ,#pdqid { .pdqatr .pdqcnt +maxdpri &pdqmb },,
-mtx,CRE_MTX,#mtxid { .mtxatr +ceilpri? },,
-mbf,CRE_MBF,#mbfid { .mbfatr .maxmsz .mbfsz &mbfmb },,
-mpf,CRE_MPF,#mpfid { .mpfatr .blkcnt .blksz &mpf &mpfmb },,
-cyc,CRE_CYC,#cycid { .cycatr { .nfymode &par1 &par2? &par3? &par4? } .cyctim .cycphs },,
-alm,CRE_ALM,#almid { .almatr { .nfymode &par1 &par2? &par3? &par4? } },,
-int,CFG_INT,.intno { .intatr +intpri },,
-isr,CRE_ISR,#isrid { .isratr &exinf .intno &isr +isrpri },,
-inh,DEF_INH,.inhno { .inhatr &inthdr },,
-exc,DEF_EXC,.excno { .excatr &exchdr },,
-ics,DEF_ICS,{ .istksz &istk },-1,
-ini,ATT_INI,{ .iniatr &exinf &inirtn },-1,
-ter,ATT_TER,{ .teratr &exinf &terrtn },-1,
Index: asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_api.def
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_api.def	(revision 306)
+++ asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_api.def	(revision 306)
@@ -0,0 +1,17 @@
+CRE_TSK #tskid* { .tskatr &exinf &task +itskpri .stksz &stk? }
+CRE_SEM #semid* { .sematr .isemcnt .maxsem }
+CRE_FLG #flgid* { .flgatr .iflgptn }
+CRE_DTQ #dtqid* { .dtqatr .dtqcnt &dtqmb? }
+CRE_PDQ #pdqid* { .pdqatr .pdqcnt +maxdpri &pdqmb? }
+CRE_MTX #mtxid* { .mtxatr +ceilpri? }
+CRE_MBF #mbfid* { .mbfatr .maxmsz .mbfsz &mbfmb? }
+CRE_MPF #mpfid* { .mpfatr .blkcnt .blksz &mpf? &mpfmb? }
+CRE_CYC #cycid* { .cycatr { .nfymode &par1 &par2? &par3? &par4? } .cyctim .cycphs }
+CRE_ALM #almid* { .almatr { .nfymode &par1 &par2? &par3? &par4? } }
+CFG_INT .intno* { .intatr +intpri }
+CRE_ISR #isrid* { .isratr &exinf .intno &isr +isrpri }
+DEF_INH .inhno* { .inhatr &inthdr }
+DEF_EXC .excno* { .excatr &exchdr }
+DEF_ICS { .istksz &istk? }
+ATT_INI { .iniatr &exinf &inirtn }
+ATT_TER { .teratr &exinf &terrtn }
Index: asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_def.csv
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_def.csv	(revision 302)
+++ 	(revision )
@@ -1,139 +1,0 @@
-SIL_ENDIAN_BIG,#defined(SIL_ENDIAN_BIG)
-SIL_ENDIAN_LITTLE,#defined(SIL_ENDIAN_LITTLE)
-TA_NULL,TA_NULL
-TA_ACT,TA_ACT
-TA_NOACTQUE,TA_NOACTQUE
-TA_TPRI,TA_TPRI
-TA_WMUL,TA_WMUL
-TA_CLR,TA_CLR
-TA_CEILING,TA_CEILING
-TA_STA,TA_STA
-TA_NONKERNEL,TA_NONKERNEL
-TA_ENAINT,TA_ENAINT
-TA_EDGE,TA_EDGE
-TNFY_HANDLER,TNFY_HANDLER
-TNFY_SETVAR,TNFY_SETVAR
-TNFY_INCVAR,TNFY_INCVAR
-TNFY_ACTTSK,TNFY_ACTTSK
-TNFY_WUPTSK,TNFY_WUPTSK
-TNFY_SIGSEM,TNFY_SIGSEM
-TNFY_SETFLG,TNFY_SETFLG
-TNFY_SNDDTQ,TNFY_SNDDTQ
-TENFY_SETVAR,TENFY_SETVAR
-TENFY_INCVAR,TENFY_INCVAR
-TENFY_ACTTSK,TENFY_ACTTSK
-TENFY_WUPTSK,TENFY_WUPTSK
-TENFY_SIGSEM,TENFY_SIGSEM
-TENFY_SETFLG,TENFY_SETFLG
-TENFY_SNDDTQ,TENFY_SNDDTQ
-TMIN_TPRI,TMIN_TPRI,signed
-TMAX_TPRI,TMAX_TPRI,signed
-TMIN_DPRI,TMIN_DPRI,signed
-TMAX_DPRI,TMAX_DPRI,signed
-TMIN_ISRPRI,TMIN_ISRPRI,signed
-TMAX_ISRPRI,TMAX_ISRPRI,signed
-TBIT_FLGPTN,TBIT_FLGPTN
-TMAX_MAXSEM,TMAX_MAXSEM
-TMAX_RELTIM,TMAX_RELTIM
-TMIN_INTPRI,TMIN_INTPRI,signed
-TMAX_INTPRI,TMAX_INTPRI,signed
-TMIN_TSKID,TMIN_TSKID,signed
-TMIN_SEMID,TMIN_SEMID,signed
-TMIN_FLGID,TMIN_FLGID,signed
-TMIN_DTQID,TMIN_DTQID,signed
-TMIN_PDQID,TMIN_PDQID,signed
-TMIN_MTXID,TMIN_MTXID,signed
-TMIN_MBFID,TMIN_MBFID,signed
-TMIN_MPFID,TMIN_MPFID,signed
-TMIN_CYCID,TMIN_CYCID,signed
-TMIN_ALMID,TMIN_ALMID,signed
-OMIT_INITIALIZE_INTERRUPT,#defined(OMIT_INITIALIZE_INTERRUPT)
-USE_INHINIB_TABLE,#defined(USE_INHINIB_TABLE)
-USE_INTINIB_TABLE,#defined(USE_INTINIB_TABLE)
-OMIT_INITIALIZE_EXCEPTION,#defined(OMIT_INITIALIZE_EXCEPTION)
-USE_TSKINICTXB,#defined(USE_TSKINICTXB)
-TARGET_TSKATR,#defined(TARGET_TSKATR),,TARGET_TSKATR
-TARGET_INTATR,#defined(TARGET_INTATR),,TARGET_INTATR
-TARGET_INHATR,#defined(TARGET_INHATR),,TARGET_INHATR
-TARGET_ISRATR,#defined(TARGET_ISRATR),,TARGET_ISRATR
-TARGET_EXCATR,#defined(TARGET_EXCATR),,TARGET_EXCATR
-TARGET_MIN_STKSZ,#defined(TARGET_MIN_STKSZ),,TARGET_MIN_STKSZ
-TARGET_MIN_ISTKSZ,#defined(TARGET_MIN_ISTKSZ),,TARGET_MIN_ISTKSZ
-CHECK_STKSZ_ALIGN,#defined(CHECK_STKSZ_ALIGN),,CHECK_STKSZ_ALIGN
-CHECK_INTPTR_ALIGN,#defined(CHECK_INTPTR_ALIGN),,CHECK_INTPTR_ALIGN
-CHECK_INTPTR_NONNULL,#defined(CHECK_INTPTR_NONNULL)
-CHECK_FUNC_ALIGN,#defined(CHECK_FUNC_ALIGN),,CHECK_FUNC_ALIGN
-CHECK_FUNC_NONNULL,#defined(CHECK_FUNC_NONNULL)
-CHECK_STACK_ALIGN,#defined(CHECK_STACK_ALIGN),,CHECK_STACK_ALIGN
-CHECK_STACK_NONNULL,#defined(CHECK_STACK_NONNULL)
-CHECK_MPF_ALIGN,#defined(CHECK_MPF_ALIGN),,CHECK_MPF_ALIGN
-CHECK_MPF_NONNULL,#defined(CHECK_MPF_NONNULL)
-sizeof_void_ptr,sizeof(void*)
-sizeof_uint_t,sizeof(uint_t)
-sizeof_size_t,sizeof(size_t)
-sizeof_intptr_t,sizeof(intptr_t)
-sizeof_ID,sizeof(ID)
-sizeof_FP,sizeof(FP)
-sizeof_INHNO,sizeof(INHNO)
-sizeof_INTNO,sizeof(INTNO)
-sizeof_EXCNO,sizeof(EXCNO)
-sizeof_TINIB,sizeof(TINIB)
-offsetof_TINIB_tskatr,"offsetof(TINIB,tskatr)"
-offsetof_TINIB_exinf,"offsetof(TINIB,exinf)"
-offsetof_TINIB_task,"offsetof(TINIB,task)"
-offsetof_TINIB_ipriority,"offsetof(TINIB,ipriority)"
-offsetof_TINIB_stksz,#!defined(USE_TSKINICTXB),,"offsetof(TINIB,stksz)"
-offsetof_TINIB_stk,#!defined(USE_TSKINICTXB),,"offsetof(TINIB,stk)"
-sizeof_SEMINIB,sizeof(SEMINIB)
-offsetof_SEMINIB_sematr,"offsetof(SEMINIB,sematr)"
-offsetof_SEMINIB_isemcnt,"offsetof(SEMINIB,isemcnt)"
-offsetof_SEMINIB_maxsem,"offsetof(SEMINIB,maxsem)"
-sizeof_FLGPTN,sizeof(FLGPTN)
-sizeof_FLGINIB,sizeof(FLGINIB)
-offsetof_FLGINIB_flgatr,"offsetof(FLGINIB,flgatr)"
-offsetof_FLGINIB_iflgptn,"offsetof(FLGINIB,iflgptn)"
-sizeof_DTQINIB,sizeof(DTQINIB)
-offsetof_DTQINIB_dtqatr,"offsetof(DTQINIB,dtqatr)"
-offsetof_DTQINIB_dtqcnt,"offsetof(DTQINIB,dtqcnt)"
-offsetof_DTQINIB_p_dtqmb,"offsetof(DTQINIB,p_dtqmb)"
-sizeof_PDQINIB,sizeof(PDQINIB)
-offsetof_PDQINIB_pdqatr,"offsetof(PDQINIB,pdqatr)"
-offsetof_PDQINIB_pdqcnt,"offsetof(PDQINIB,pdqcnt)"
-offsetof_PDQINIB_maxdpri,"offsetof(PDQINIB,maxdpri)"
-offsetof_PDQINIB_p_pdqmb,"offsetof(PDQINIB,p_pdqmb)"
-sizeof_MTXINIB,sizeof(MTXINIB)
-offsetof_MTXINIB_mtxatr,"offsetof(MTXINIB,mtxatr)"
-offsetof_MTXINIB_ceilpri,"offsetof(MTXINIB,ceilpri)"
-sizeof_MBFINIB,sizeof(MBFINIB)
-offsetof_MBFINIB_mbfatr,"offsetof(MBFINIB,mbfatr)"
-offsetof_MBFINIB_maxmsz,"offsetof(MBFINIB,maxmsz)"
-offsetof_MBFINIB_mbfsz,"offsetof(MBFINIB,mbfsz)"
-offsetof_MBFINIB_mbfmb,"offsetof(MBFINIB,mbfmb)"
-sizeof_MPFINIB,sizeof(MPFINIB)
-offsetof_MPFINIB_mpfatr,"offsetof(MPFINIB,mpfatr)"
-offsetof_MPFINIB_blkcnt,"offsetof(MPFINIB,blkcnt)"
-offsetof_MPFINIB_blksz,"offsetof(MPFINIB,blksz)"
-offsetof_MPFINIB_mpf,"offsetof(MPFINIB,mpf)"
-offsetof_MPFINIB_p_mpfmb,"offsetof(MPFINIB,p_mpfmb)"
-sizeof_CYCINIB,sizeof(CYCINIB)
-offsetof_CYCINIB_cycatr,"offsetof(CYCINIB,cycatr)"
-offsetof_CYCINIB_exinf,"offsetof(CYCINIB,exinf)"
-offsetof_CYCINIB_nfyhdr,"offsetof(CYCINIB,nfyhdr)"
-offsetof_CYCINIB_cyctim,"offsetof(CYCINIB,cyctim)"
-offsetof_CYCINIB_cycphs,"offsetof(CYCINIB,cycphs)"
-sizeof_ALMINIB,sizeof(ALMINIB)
-offsetof_ALMINIB_almatr,"offsetof(ALMINIB,almatr)"
-offsetof_ALMINIB_exinf,"offsetof(ALMINIB,exinf)"
-offsetof_ALMINIB_nfyhdr,"offsetof(ALMINIB,nfyhdr)"
-sizeof_INHINIB,#!defined(OMIT_INITIALIZE_INTERRUPT),,sizeof(INHINIB)
-offset_INHINIB_inhno,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INHINIB,inhno)"
-offset_INHINIB_inhatr,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INHINIB,inhatr)"
-offset_INHINIB_int_entry,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INHINIB,int_entry)"
-sizeof_INTINIB,#!defined(OMIT_INITIALIZE_INTERRUPT),,sizeof(INTINIB)
-offset_INTINIB_intno,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INTINIB,intno)"
-offset_INTINIB_intatr,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INTINIB,intatr)"
-offset_INTINIB_intpri,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INTINIB,intpri)"
-sizeof_EXCINIB,#!defined(OMIT_INITIALIZE_EXCEPTION),,sizeof(EXCINIB)
-offset_EXCINIB_excno,#!defined(OMIT_INITIALIZE_EXCEPTION),,"offsetof(EXCINIB,excno)"
-offset_EXCINIB_excatr,#!defined(OMIT_INITIALIZE_EXCEPTION),,"offsetof(EXCINIB,excatr)"
-offset_EXCINIB_exc_entry,#!defined(OMIT_INITIALIZE_EXCEPTION),,"offsetof(EXCINIB,exc_entry)"
Index: asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_impl.h
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_impl.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_impl.h	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2004-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2004-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: kernel_impl.h 332 2015-06-21 13:20:37Z ertl-hiro $
+ *  $Id: kernel_impl.h 748 2016-05-14 14:30:06Z ertl-hiro $
  */
 
@@ -88,11 +88,4 @@
  */
 #include <t_syslog.h>
-
-/*
- *  åã­ã£ã¹ããè¡ããã¯ã­ã®å®ç¾©
- */
-#ifndef CAST
-#define CAST(type, val)		((type)(val))
-#endif /* CAST */
 
 /*
@@ -164,4 +157,9 @@
 
 /*
+ *  TECSã®åæåï¼init_tecs.cï¼
+ */
+extern void initialize_tecs(void);
+
+/*
  *  åã¢ã¸ã¥ã¼ã«ã®åæåï¼kernel_cfg.cï¼
  */
Index: asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_rename.def
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_rename.def	(revision 302)
+++ asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_rename.def	(revision 306)
@@ -88,5 +88,4 @@
 
 # messagebuf.c
-mbfhook_dequeue_wobj
 initialize_messagebuf
 enqueue_message
Index: asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_rename.h
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_rename.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_rename.h	(revision 306)
@@ -115,5 +115,4 @@
  *  messagebuf.c
  */
-#define mbfhook_dequeue_wobj		_kernel_mbfhook_dequeue_wobj
 #define initialize_messagebuf		_kernel_initialize_messagebuf
 #define enqueue_message				_kernel_enqueue_message
@@ -201,205 +200,4 @@
 
 
-#ifdef TOPPERS_LABEL_ASM
-
-/*
- *  startup.c
- */
-#define _kerflg						__kernel_kerflg
-#define _exit_kernel				__kernel_exit_kernel
-
-/*
- *  task.c
- */
-#define _p_runtsk					__kernel_p_runtsk
-#define _p_schedtsk					__kernel_p_schedtsk
-#define _enadsp						__kernel_enadsp
-#define _dspflg						__kernel_dspflg
-#define _ready_queue				__kernel_ready_queue
-#define _ready_primap				__kernel_ready_primap
-#define _initialize_task			__kernel_initialize_task
-#define _search_schedtsk			__kernel_search_schedtsk
-#define _make_runnable				__kernel_make_runnable
-#define _make_non_runnable			__kernel_make_non_runnable
-#define _make_dormant				__kernel_make_dormant
-#define _make_active				__kernel_make_active
-#define _change_priority			__kernel_change_priority
-#define _rotate_ready_queue			__kernel_rotate_ready_queue
-#define _task_terminate				__kernel_task_terminate
-
-/*
- *  taskhook.c
- */
-#define _mtxhook_check_ceilpri		__kernel_mtxhook_check_ceilpri
-#define _mtxhook_scan_ceilmtx		__kernel_mtxhook_scan_ceilmtx
-#define _mtxhook_release_all		__kernel_mtxhook_release_all
-#define _mbfhook_dequeue_wobj		__kernel_mbfhook_dequeue_wobj
-
-/*
- *  wait.c
- */
-#define _make_wait_tmout			__kernel_make_wait_tmout
-#define _wait_dequeue_wobj			__kernel_wait_dequeue_wobj
-#define _wait_complete				__kernel_wait_complete
-#define _wait_tmout					__kernel_wait_tmout
-#define _wait_tmout_ok				__kernel_wait_tmout_ok
-#define _wobj_make_wait				__kernel_wobj_make_wait
-#define _wobj_make_wait_tmout		__kernel_wobj_make_wait_tmout
-#define _init_wait_queue			__kernel_init_wait_queue
-
-/*
- *  time_event.c
- */
-#define _boundary_evttim			__kernel_boundary_evttim
-#define _current_evttim				__kernel_current_evttim
-#define _current_hrtcnt				__kernel_current_hrtcnt
-#define _monotonic_evttim			__kernel_monotonic_evttim
-#define _systim_offset				__kernel_systim_offset
-#define _in_signal_time				__kernel_in_signal_time
-#define _initialize_tmevt			__kernel_initialize_tmevt
-#define _tmevt_up					__kernel_tmevt_up
-#define _tmevt_down					__kernel_tmevt_down
-#define _update_current_evttim		__kernel_update_current_evttim
-#define _set_hrt_event				__kernel_set_hrt_event
-#define _tmevtb_register			__kernel_tmevtb_register
-#define _tmevtb_enqueue				__kernel_tmevtb_enqueue
-#define _tmevtb_dequeue				__kernel_tmevtb_dequeue
-#define _check_adjtim				__kernel_check_adjtim
-#define _tmevt_lefttim				__kernel_tmevt_lefttim
-#define _signal_time				__kernel_signal_time
-
-/*
- *  semaphore.c
- */
-#define _initialize_semaphore		__kernel_initialize_semaphore
-
-/*
- *  eventflag.c
- */
-#define _initialize_eventflag		__kernel_initialize_eventflag
-#define _check_flg_cond				__kernel_check_flg_cond
-
-/*
- *  dataqueue.c
- */
-#define _initialize_dataqueue		__kernel_initialize_dataqueue
-#define _enqueue_data				__kernel_enqueue_data
-#define _force_enqueue_data			__kernel_force_enqueue_data
-#define _dequeue_data				__kernel_dequeue_data
-#define _send_data					__kernel_send_data
-#define _force_send_data			__kernel_force_send_data
-#define _receive_data				__kernel_receive_data
-
-/*
- *  pridataq.c
- */
-#define _initialize_pridataq		__kernel_initialize_pridataq
-#define _enqueue_pridata			__kernel_enqueue_pridata
-#define _dequeue_pridata			__kernel_dequeue_pridata
-#define _send_pridata				__kernel_send_pridata
-#define _receive_pridata			__kernel_receive_pridata
-
-/*
- *  mutex.c
- */
-#define _initialize_mutex			__kernel_initialize_mutex
-#define _mutex_check_ceilpri		__kernel_mutex_check_ceilpri
-#define _mutex_scan_ceilmtx			__kernel_mutex_scan_ceilmtx
-#define _mutex_drop_priority		__kernel_mutex_drop_priority
-#define _mutex_acquire				__kernel_mutex_acquire
-#define _mutex_release				__kernel_mutex_release
-#define _mutex_release_all			__kernel_mutex_release_all
-
-/*
- *  messagebuf.c
- */
-#define _mbfhook_dequeue_wobj		__kernel_mbfhook_dequeue_wobj
-#define _initialize_messagebuf		__kernel_initialize_messagebuf
-#define _enqueue_message			__kernel_enqueue_message
-#define _dequeue_message			__kernel_dequeue_message
-#define _send_message				__kernel_send_message
-#define _messagebuf_signal			__kernel_messagebuf_signal
-#define _receive_message			__kernel_receive_message
-#define _messagebuf_dequeue_wobj	__kernel_messagebuf_dequeue_wobj
-
-/*
- *  mempfix.c
- */
-#define _initialize_mempfix			__kernel_initialize_mempfix
-#define _get_mpf_block				__kernel_get_mpf_block
-
-/*
- *  cyclic.c
- */
-#define _initialize_cyclic			__kernel_initialize_cyclic
-#define _call_cyclic				__kernel_call_cyclic
-
-/*
- *  alarm.c
- */
-#define _initialize_alarm			__kernel_initialize_alarm
-#define _call_alarm					__kernel_call_alarm
-
-/*
- *  interrupt.c
- */
-#define _initialize_interrupt		__kernel_initialize_interrupt
-
-/*
- *  exception.c
- */
-#define _initialize_exception		__kernel_initialize_exception
-
-/*
- *  kernel_cfg.c
- */
-#define _initialize_object			__kernel_initialize_object
-#define _call_inirtn				__kernel_call_inirtn
-#define _call_terrtn				__kernel_call_terrtn
-#define _tmax_tskid					__kernel_tmax_tskid
-#define _tinib_table				__kernel_tinib_table
-#define _torder_table				__kernel_torder_table
-#define _tcb_table					__kernel_tcb_table
-#define _tmax_semid					__kernel_tmax_semid
-#define _seminib_table				__kernel_seminib_table
-#define _semcb_table				__kernel_semcb_table
-#define _tmax_flgid					__kernel_tmax_flgid
-#define _flginib_table				__kernel_flginib_table
-#define _flgcb_table				__kernel_flgcb_table
-#define _tmax_dtqid					__kernel_tmax_dtqid
-#define _dtqinib_table				__kernel_dtqinib_table
-#define _dtqcb_table				__kernel_dtqcb_table
-#define _tmax_pdqid					__kernel_tmax_pdqid
-#define _pdqinib_table				__kernel_pdqinib_table
-#define _pdqcb_table				__kernel_pdqcb_table
-#define _tmax_mtxid					__kernel_tmax_mtxid
-#define _mtxinib_table				__kernel_mtxinib_table
-#define _mtxcb_table				__kernel_mtxcb_table
-#define _tmax_mbfid					__kernel_tmax_mbfid
-#define _mbfinib_table				__kernel_mbfinib_table
-#define _mbfcb_table				__kernel_mbfcb_table
-#define _tmax_mpfid					__kernel_tmax_mpfid
-#define _mpfinib_table				__kernel_mpfinib_table
-#define _mpfcb_table				__kernel_mpfcb_table
-#define _tmax_cycid					__kernel_tmax_cycid
-#define _cycinib_table				__kernel_cycinib_table
-#define _cyccb_table				__kernel_cyccb_table
-#define _tmax_almid					__kernel_tmax_almid
-#define _alminib_table				__kernel_alminib_table
-#define _almcb_table				__kernel_almcb_table
-#define _tnum_def_inhno				__kernel_tnum_def_inhno
-#define _inhinib_table				__kernel_inhinib_table
-#define _tnum_cfg_intno				__kernel_tnum_cfg_intno
-#define _intinib_table				__kernel_intinib_table
-#define _tnum_def_excno				__kernel_tnum_def_excno
-#define _excinib_table				__kernel_excinib_table
-#define _tmevt_heap					__kernel_tmevt_heap
-#define _istksz						__kernel_istksz
-#define _istk						__kernel_istk
-#define _istkpt						__kernel_istkpt
-
-
-#endif /* TOPPERS_LABEL_ASM */
-
 #include "target_rename.h"
 
Index: asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_sym.def
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_sym.def	(revision 306)
+++ asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_sym.def	(revision 306)
@@ -0,0 +1,149 @@
+USE_EXTERNAL_ID,true,bool,defined(USE_EXTERNAL_ID)
+SIL_ENDIAN_BIG,true,bool,defined(SIL_ENDIAN_BIG)
+SIL_ENDIAN_LITTLE,true,bool,defined(SIL_ENDIAN_LITTLE)
+TA_NULL
+TA_ACT
+TA_NOACTQUE
+TA_TPRI
+TA_WMUL
+TA_CLR
+TA_CEILING
+TA_STA
+TA_NONKERNEL
+TA_ENAINT
+TA_EDGE
+TNFY_HANDLER
+TNFY_SETVAR
+TNFY_INCVAR
+TNFY_ACTTSK
+TNFY_WUPTSK
+TNFY_SIGSEM
+TNFY_SETFLG
+TNFY_SNDDTQ
+TENFY_SETVAR
+TENFY_INCVAR
+TENFY_ACTTSK
+TENFY_WUPTSK
+TENFY_SIGSEM
+TENFY_SETFLG
+TENFY_SNDDTQ
+TMIN_TPRI,,signed
+TMAX_TPRI,,signed
+TMIN_DPRI,,signed
+TMAX_DPRI,,signed
+TMIN_ISRPRI,,signed
+TMAX_ISRPRI,,signed
+TBIT_FLGPTN
+TMAX_MAXSEM
+TMAX_RELTIM
+TMIN_INTPRI,,signed
+TMAX_INTPRI,,signed
+TMIN_TSKID,,signed
+TMIN_SEMID,,signed
+TMIN_FLGID,,signed
+TMIN_DTQID,,signed
+TMIN_PDQID,,signed
+TMIN_MTXID,,signed
+TMIN_MBFID,,signed
+TMIN_MPFID,,signed
+TMIN_CYCID,,signed
+TMIN_ALMID,,signed
+USE_TSKINICTXB,true,bool,defined(USE_TSKINICTXB)
+OMIT_INITIALIZE_INTERRUPT,true,bool,defined(OMIT_INITIALIZE_INTERRUPT)
+USE_INHINIB_TABLE,true,bool,defined(USE_INHINIB_TABLE)
+USE_INTINIB_TABLE,true,bool,defined(USE_INTINIB_TABLE)
+OMIT_INITIALIZE_EXCEPTION,true,bool,defined(OMIT_INITIALIZE_EXCEPTION)
+DEFAULT_ISTK,,,defined(DEFAULT_ISTK)
+TARGET_TSKATR,,,defined(TARGET_TSKATR),0
+TARGET_INTATR,,,defined(TARGET_INTATR),0
+TARGET_INHATR,,,defined(TARGET_INHATR),0
+TARGET_ISRATR,,,defined(TARGET_ISRATR),0
+TARGET_EXCATR,,,defined(TARGET_EXCATR),0
+TARGET_MIN_STKSZ,,,defined(TARGET_MIN_STKSZ),1
+TARGET_MIN_ISTKSZ,,,defined(TARGET_MIN_ISTKSZ),1
+CHECK_STKSZ_ALIGN,,,defined(CHECK_STKSZ_ALIGN),1
+CHECK_INTPTR_ALIGN,,,defined(CHECK_INTPTR_ALIGN),1
+CHECK_INTPTR_NONNULL,true,bool,defined(CHECK_INTPTR_NONNULL)
+CHECK_FUNC_ALIGN,,,defined(CHECK_FUNC_ALIGN),1
+CHECK_FUNC_NONNULL,true,bool,defined(CHECK_FUNC_NONNULL)
+CHECK_STACK_ALIGN,,,defined(CHECK_STACK_ALIGN),1
+CHECK_STACK_NONNULL,true,bool,defined(CHECK_STACK_NONNULL)
+CHECK_MPF_ALIGN,,,defined(CHECK_MPF_ALIGN),1
+CHECK_MPF_NONNULL,true,bool,defined(CHECK_MPF_NONNULL)
+sizeof_void_ptr,sizeof(void*)
+sizeof_uint_t,sizeof(uint_t)
+sizeof_size_t,sizeof(size_t)
+sizeof_intptr_t,sizeof(intptr_t)
+sizeof_ID,sizeof(ID)
+sizeof_FP,sizeof(FP)
+sizeof_INTNO,sizeof(INTNO)
+sizeof_INHNO,sizeof(INHNO)
+sizeof_EXCNO,sizeof(EXCNO)
+sizeof_TASK,sizeof(TASK)
+sizeof_TMEHDR,sizeof(TMEHDR)
+sizeof_ISR,sizeof(ISR)
+sizeof_INTHDR,sizeof(INTHDR)
+sizeof_EXCHDR,sizeof(EXCHDR)
+sizeof_INIRTN,sizeof(INIRTN)
+sizeof_TERRTN,sizeof(TERRTN)
+sizeof_NFYHDR,sizeof(NFYHDR)
+sizeof_TINIB,sizeof(TINIB)
+offsetof_TINIB_tskatr,"offsetof(TINIB,tskatr)"
+offsetof_TINIB_exinf,"offsetof(TINIB,exinf)"
+offsetof_TINIB_task,"offsetof(TINIB,task)"
+offsetof_TINIB_ipriority,"offsetof(TINIB,ipriority)"
+offsetof_TINIB_stksz,"offsetof(TINIB,stksz)",,!defined(USE_TSKINICTXB)
+offsetof_TINIB_stk,"offsetof(TINIB,stk)",,!defined(USE_TSKINICTXB)
+sizeof_SEMINIB,sizeof(SEMINIB)
+offsetof_SEMINIB_sematr,"offsetof(SEMINIB,sematr)"
+offsetof_SEMINIB_isemcnt,"offsetof(SEMINIB,isemcnt)"
+offsetof_SEMINIB_maxsem,"offsetof(SEMINIB,maxsem)"
+sizeof_FLGPTN,sizeof(FLGPTN)
+sizeof_FLGINIB,sizeof(FLGINIB)
+offsetof_FLGINIB_flgatr,"offsetof(FLGINIB,flgatr)"
+offsetof_FLGINIB_iflgptn,"offsetof(FLGINIB,iflgptn)"
+sizeof_DTQINIB,sizeof(DTQINIB)
+offsetof_DTQINIB_dtqatr,"offsetof(DTQINIB,dtqatr)"
+offsetof_DTQINIB_dtqcnt,"offsetof(DTQINIB,dtqcnt)"
+offsetof_DTQINIB_p_dtqmb,"offsetof(DTQINIB,p_dtqmb)"
+sizeof_PDQINIB,sizeof(PDQINIB)
+offsetof_PDQINIB_pdqatr,"offsetof(PDQINIB,pdqatr)"
+offsetof_PDQINIB_pdqcnt,"offsetof(PDQINIB,pdqcnt)"
+offsetof_PDQINIB_maxdpri,"offsetof(PDQINIB,maxdpri)"
+offsetof_PDQINIB_p_pdqmb,"offsetof(PDQINIB,p_pdqmb)"
+sizeof_MTXINIB,sizeof(MTXINIB)
+offsetof_MTXINIB_mtxatr,"offsetof(MTXINIB,mtxatr)"
+offsetof_MTXINIB_ceilpri,"offsetof(MTXINIB,ceilpri)"
+sizeof_MBFINIB,sizeof(MBFINIB)
+offsetof_MBFINIB_mbfatr,"offsetof(MBFINIB,mbfatr)"
+offsetof_MBFINIB_maxmsz,"offsetof(MBFINIB,maxmsz)"
+offsetof_MBFINIB_mbfsz,"offsetof(MBFINIB,mbfsz)"
+offsetof_MBFINIB_mbfmb,"offsetof(MBFINIB,mbfmb)"
+sizeof_MPFINIB,sizeof(MPFINIB)
+offsetof_MPFINIB_mpfatr,"offsetof(MPFINIB,mpfatr)"
+offsetof_MPFINIB_blkcnt,"offsetof(MPFINIB,blkcnt)"
+offsetof_MPFINIB_blksz,"offsetof(MPFINIB,blksz)"
+offsetof_MPFINIB_mpf,"offsetof(MPFINIB,mpf)"
+offsetof_MPFINIB_p_mpfmb,"offsetof(MPFINIB,p_mpfmb)"
+sizeof_CYCINIB,sizeof(CYCINIB)
+offsetof_CYCINIB_cycatr,"offsetof(CYCINIB,cycatr)"
+offsetof_CYCINIB_exinf,"offsetof(CYCINIB,exinf)"
+offsetof_CYCINIB_nfyhdr,"offsetof(CYCINIB,nfyhdr)"
+offsetof_CYCINIB_cyctim,"offsetof(CYCINIB,cyctim)"
+offsetof_CYCINIB_cycphs,"offsetof(CYCINIB,cycphs)"
+sizeof_ALMINIB,sizeof(ALMINIB)
+offsetof_ALMINIB_almatr,"offsetof(ALMINIB,almatr)"
+offsetof_ALMINIB_exinf,"offsetof(ALMINIB,exinf)"
+offsetof_ALMINIB_nfyhdr,"offsetof(ALMINIB,nfyhdr)"
+sizeof_INHINIB,sizeof(INHINIB),,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INHINIB_inhno,"offsetof(INHINIB,inhno)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INHINIB_inhatr,"offsetof(INHINIB,inhatr)",,!defined(OMIT_INITIALIZE_INTERRUPT),,
+offset_INHINIB_int_entry,"offsetof(INHINIB,int_entry)",,!defined(OMIT_INITIALIZE_INTERRUPT),,
+sizeof_INTINIB,sizeof(INTINIB),,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INTINIB_intno,"offsetof(INTINIB,intno)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INTINIB_intatr,"offsetof(INTINIB,intatr)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INTINIB_intpri,"offsetof(INTINIB,intpri)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+sizeof_EXCINIB,sizeof(EXCINIB),,!defined(OMIT_INITIALIZE_EXCEPTION)
+offset_EXCINIB_excno,"offsetof(EXCINIB,excno)",,!defined(OMIT_INITIALIZE_EXCEPTION)
+offset_EXCINIB_excatr,"offsetof(EXCINIB,excatr)",,!defined(OMIT_INITIALIZE_EXCEPTION)
+offset_EXCINIB_exc_entry,"offsetof(EXCINIB,exc_entry)",,!defined(OMIT_INITIALIZE_EXCEPTION)
Index: asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_unrename.h
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_unrename.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/messagebuf/kernel/kernel_unrename.h	(revision 306)
@@ -116,5 +116,4 @@
  *  messagebuf.c
  */
-#undef mbfhook_dequeue_wobj
 #undef initialize_messagebuf
 #undef enqueue_message
@@ -202,205 +201,4 @@
 
 
-#ifdef TOPPERS_LABEL_ASM
-
-/*
- *  startup.c
- */
-#undef _kerflg
-#undef _exit_kernel
-
-/*
- *  task.c
- */
-#undef _p_runtsk
-#undef _p_schedtsk
-#undef _enadsp
-#undef _dspflg
-#undef _ready_queue
-#undef _ready_primap
-#undef _initialize_task
-#undef _search_schedtsk
-#undef _make_runnable
-#undef _make_non_runnable
-#undef _make_dormant
-#undef _make_active
-#undef _change_priority
-#undef _rotate_ready_queue
-#undef _task_terminate
-
-/*
- *  taskhook.c
- */
-#undef _mtxhook_check_ceilpri
-#undef _mtxhook_scan_ceilmtx
-#undef _mtxhook_release_all
-#undef _mbfhook_dequeue_wobj
-
-/*
- *  wait.c
- */
-#undef _make_wait_tmout
-#undef _wait_dequeue_wobj
-#undef _wait_complete
-#undef _wait_tmout
-#undef _wait_tmout_ok
-#undef _wobj_make_wait
-#undef _wobj_make_wait_tmout
-#undef _init_wait_queue
-
-/*
- *  time_event.c
- */
-#undef _boundary_evttim
-#undef _current_evttim
-#undef _current_hrtcnt
-#undef _monotonic_evttim
-#undef _systim_offset
-#undef _in_signal_time
-#undef _initialize_tmevt
-#undef _tmevt_up
-#undef _tmevt_down
-#undef _update_current_evttim
-#undef _set_hrt_event
-#undef _tmevtb_register
-#undef _tmevtb_enqueue
-#undef _tmevtb_dequeue
-#undef _check_adjtim
-#undef _tmevt_lefttim
-#undef _signal_time
-
-/*
- *  semaphore.c
- */
-#undef _initialize_semaphore
-
-/*
- *  eventflag.c
- */
-#undef _initialize_eventflag
-#undef _check_flg_cond
-
-/*
- *  dataqueue.c
- */
-#undef _initialize_dataqueue
-#undef _enqueue_data
-#undef _force_enqueue_data
-#undef _dequeue_data
-#undef _send_data
-#undef _force_send_data
-#undef _receive_data
-
-/*
- *  pridataq.c
- */
-#undef _initialize_pridataq
-#undef _enqueue_pridata
-#undef _dequeue_pridata
-#undef _send_pridata
-#undef _receive_pridata
-
-/*
- *  mutex.c
- */
-#undef _initialize_mutex
-#undef _mutex_check_ceilpri
-#undef _mutex_scan_ceilmtx
-#undef _mutex_drop_priority
-#undef _mutex_acquire
-#undef _mutex_release
-#undef _mutex_release_all
-
-/*
- *  messagebuf.c
- */
-#undef _mbfhook_dequeue_wobj
-#undef _initialize_messagebuf
-#undef _enqueue_message
-#undef _dequeue_message
-#undef _send_message
-#undef _messagebuf_signal
-#undef _receive_message
-#undef _messagebuf_dequeue_wobj
-
-/*
- *  mempfix.c
- */
-#undef _initialize_mempfix
-#undef _get_mpf_block
-
-/*
- *  cyclic.c
- */
-#undef _initialize_cyclic
-#undef _call_cyclic
-
-/*
- *  alarm.c
- */
-#undef _initialize_alarm
-#undef _call_alarm
-
-/*
- *  interrupt.c
- */
-#undef _initialize_interrupt
-
-/*
- *  exception.c
- */
-#undef _initialize_exception
-
-/*
- *  kernel_cfg.c
- */
-#undef _initialize_object
-#undef _call_inirtn
-#undef _call_terrtn
-#undef _tmax_tskid
-#undef _tinib_table
-#undef _torder_table
-#undef _tcb_table
-#undef _tmax_semid
-#undef _seminib_table
-#undef _semcb_table
-#undef _tmax_flgid
-#undef _flginib_table
-#undef _flgcb_table
-#undef _tmax_dtqid
-#undef _dtqinib_table
-#undef _dtqcb_table
-#undef _tmax_pdqid
-#undef _pdqinib_table
-#undef _pdqcb_table
-#undef _tmax_mtxid
-#undef _mtxinib_table
-#undef _mtxcb_table
-#undef _tmax_mbfid
-#undef _mbfinib_table
-#undef _mbfcb_table
-#undef _tmax_mpfid
-#undef _mpfinib_table
-#undef _mpfcb_table
-#undef _tmax_cycid
-#undef _cycinib_table
-#undef _cyccb_table
-#undef _tmax_almid
-#undef _alminib_table
-#undef _almcb_table
-#undef _tnum_def_inhno
-#undef _inhinib_table
-#undef _tnum_cfg_intno
-#undef _intinib_table
-#undef _tnum_def_excno
-#undef _excinib_table
-#undef _tmevt_heap
-#undef _istksz
-#undef _istk
-#undef _istkpt
-
-
-#endif /* TOPPERS_LABEL_ASM */
-
 #include "target_unrename.h"
 
Index: asp3_wo_tecs/trunk/extension/messagebuf/kernel/messagebuf.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/kernel/messagebuf.tf	(revision 302)
+++ 	(revision )
@@ -1,167 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: messagebuf.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		ã¡ãã»ã¼ã¸ãããã¡æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_MBFID	$LENGTH(MBF.ID_LIST)$$NL$
-$FOREACH id MBF.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Message Buffer Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  ã¡ãã»ã¼ã¸ãããã¡ã®IDçªå·ãä¿æããå¤æ°
-$
-$IF USE_EXTERNAL_ID$
-	$FOREACH id MBF.ID_LIST$
-		const ID $id$_id = $+id$;$NL$
-	$END$
-$END$
-
-$
-$  ã¡ãã»ã¼ã¸ãããã¡IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_mbfid = (TMIN_MBFID + TNUM_MBFID - 1);$NL$
-$NL$
-
-$
-$  ã¡ãã»ã¼ã¸ãããã¡åæåãã­ãã¯
-$
-$IF LENGTH(MBF.ID_LIST)$
-	$FOREACH mbfid MBF.ID_LIST$
-$		// mbfatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3303ï¼½
-$		//ï¼TA_NULLã§ãªãå ´åï¼
-		$IF MBF.MBFATR[mbfid] != TA_NULL$
-			$ERROR MBF.TEXT_LINE[mbfid]$E_RSATR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"mbfatr", MBF.MBFATR[mbfid], mbfid, "CRE_MBF")$
-			$END$
-		$END$
-
-$		// maxmszã0ä»¥ä¸ã®å ´åï¼E_PARï¼ï¼»NGKI3307ï¼½
-		$IF MBF.MAXMSZ[mbfid] <= 0$
-			$ERROR MBF.TEXT_LINE[mbfid]$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"maxmsz", MBF.MAXMSZ[mbfid], mbfid, "CRE_MBF")$
-			$END$
-		$END$
-
-$		// mbfszãè² ã®å ´åï¼E_PARï¼ï¼»NGKI3308ï¼½
-		$IF MBF.MBFSZ[mbfid] < 0$
-			$ERROR MBF.TEXT_LINE[mbfid]$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"mbfsz", MBF.MBFSZ[mbfid], mbfid, "CRE_MBF")$
-			$END$
-		$END$
-
-$		// mbfmbãNULLã§ãªãå ´åï¼E_NOSPTï¼ï¼»ASPS0205ï¼½
-		$IF !EQ(MBF.MBFMB[mbfid], "NULL")$
-			$ERROR MBF.TEXT_LINE[mbfid]$E_NOSPT:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"mbfmb", MBF.MBFMB[mbfid], mbfid, "CRE_MBF")$
-			$END$
-		$END$
-
-$		// ã¡ãã»ã¼ã¸ãããã¡ç®¡çé å
-		$IF MBF.MBFSZ[mbfid]$
-			static uint_t _kernel_mbfmb_$mbfid$
-					[TOPPERS_COUNT_SZ($MBF.MBFSZ[mbfid]$, sizeof(uint_t))];$NL$
-		$END$
-	$END$
-
-$	// ã¡ãã»ã¼ã¸ãããã¡åæåãã­ãã¯
-	const MBFINIB _kernel_mbfinib_table[TNUM_MBFID] = {$NL$
-	$JOINEACH mbfid MBF.ID_LIST ",\n"$
-		$TAB${$SPC$
-			($MBF.MBFATR[mbfid]$),$SPC$
-			($MBF.MAXMSZ[mbfid]$),$SPC$
-			TOPPERS_ROUND_SZ($MBF.MBFSZ[mbfid]$, sizeof(uint_t)),$SPC$
-			$IF MBF.MBFSZ[mbfid]$
-				_kernel_mbfmb_$mbfid$
-			$ELSE$
-				NULL
-			$END$$SPC$
-		}$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const MBFINIB, _kernel_mbfinib_table);$NL$
-$END$$NL$
-
-$
-$  ã¡ãã»ã¼ã¸ãããã¡ç®¡çãã­ãã¯ã¨ã¡ãã»ã¼ã¸ãããã¡æ©è½åæåé¢æ°
-$
-$IF LENGTH(MBF.ID_LIST)$
-	MBFCB _kernel_mbfcb_table[TNUM_MBFID];$NL$
-	$initfuncs = APPEND(initfuncs, "_kernel_initialize_messagebuf();")$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(MBFCB, _kernel_mbfcb_table);$NL$
-$END$$NL$
Index: asp3_wo_tecs/trunk/extension/messagebuf/kernel/messagebuf.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/kernel/messagebuf.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/messagebuf/kernel/messagebuf.trb	(revision 306)
@@ -0,0 +1,110 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: messagebuf.trb 672 2016-03-05 15:33:08Z ertl-hiro $
+# 
+
+#
+#		ã¡ãã»ã¼ã¸ãããã¡æ©è½ã®çæã¹ã¯ãªãã
+#
+
+class MessagebufObject < KernelObject
+  def initialize()
+    super("mbf", "messagebuf")
+  end
+
+  def prepare(key, params)
+    # ãã©ã¡ã¼ã¿ãçç¥ãããæã®ããã©ã«ãå¤ã®è¨­å®
+    params[:mbfmb] ||= "NULL"
+
+    # mbfatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3303ï¼½
+    #ï¼TA_NULLã§ãªãå ´åï¼
+    if params[:mbfatr] != $TA_NULL
+      error_illegal_id("E_RSATR", params, :mbfatr, :mbfid)
+    end
+
+    # maxmszã0ã®å ´åï¼E_PARï¼ï¼»NGKI3307ï¼½
+    if params[:maxmsz] == 0
+      error_illegal_id("E_PAR", params, :maxmsz, :mbfid)
+    end
+
+    # mbfmbãNULLã§ãªãå ´åï¼E_NOSPTï¼ï¼»ASPS0205ï¼½
+    if params[:mbfmb] != "NULL"
+      error_illegal_id("E_NOSPT", params, :mbfmb, :mbfid)
+    end
+
+    # ã¡ãã»ã¼ã¸ãããã¡ç®¡çé å
+    if params[:mbfsz] > 0
+      mbfmbName = "_kernel_mbfmb_#{params[:mbfid]}"
+      $kernelCfgC.add("static uint_t #{mbfmbName}" \
+				"[TOPPERS_COUNT_SZ(#{params[:mbfsz]}, sizeof(uint_t))];")
+      params[:mbfinib_mbfmb] = mbfmbName
+    else
+      params[:mbfinib_mbfmb] = "NULL"
+    end
+  end
+
+  def generateInib(key, params)
+    return("(#{params[:mbfatr]}), (#{params[:maxmsz]}), " \
+				"TOPPERS_ROUND_SZ(#{params[:mbfsz]}, sizeof(uint_t)), " \
+				"#{params[:mbfinib_mbfmb]}")
+  end
+end
+
+#
+#  ãã¼ã¿ã­ã¥ã¼ã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Message Buffer Functions")
+MessagebufObject.new.generate()
Index: asp3_wo_tecs/trunk/extension/messagebuf/test/bit_kernel.c
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/test/bit_kernel.c	(revision 302)
+++ asp3_wo_tecs/trunk/extension/messagebuf/test/bit_kernel.c	(revision 306)
@@ -4,5 +4,5 @@
  *      Advanced Standard Profile Kernel
  * 
- *  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -51,5 +51,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: bit_kernel.c 53 2014-04-26 18:58:00Z ertl-hiro $
+ *  $Id: bit_kernel.c 741 2016-04-05 15:51:59Z ertl-hiro $
  */
 
@@ -69,4 +69,5 @@
 #include "kernel/mempfix.h"
 #include "kernel/time_event.h"
+#include "kernel/check.h"
 
 /*
@@ -149,9 +150,117 @@
 on_stack(void *addr, const TINIB *p_tinib)
 {
+#ifdef USE_TSKINICTXB
+	/*
+	 *  ãã®é¢æ°ã®å®è£
+ã¯ã¿ã¼ã²ããä¾å­ã«ãªãï¼
+	 */
+	return(true);
+#else /* USE_TSKINICTXB */
 	if (p_tinib->stk <= addr
-				&& addr < (void *)((char *)(p_tinib->stk) + p_tinib->stksz)) {
+			&& addr < (void *)((char *)(p_tinib->stk) + p_tinib->stksz)) {
 		return(true);
 	}
 	return(false);
+#endif /* USE_TSKINICTXB */
+}
+
+/*
+ *  ã¹ã±ã¸ã¥ã¼ãªã³ã°ã®ããã®ãã¼ã¿æ§é ã®æ¤æ»
+ */
+#ifndef PRIMAP_BIT
+#define	PRIMAP_BIT(pri)		(1U << (pri))
+#endif /* PRIMAP_BIT */
+
+Inline bool_t
+primap_empty(void)
+{
+#ifndef PRIMAP_LEVEL_2
+	return(ready_primap == 0U);
+#else /* PRIMAP_LEVEL_2 */
+	return(ready_primap1 == 0U);
+#endif /* PRIMAP_LEVEL_2 */
+}
+
+Inline uint16_t
+primap_extract_bit(uint_t pri)
+{
+#ifndef PRIMAP_LEVEL_2
+	return(ready_primap & PRIMAP_BIT(pri));
+#else /* PRIMAP_LEVEL_2 */
+	return(ready_primap2[pri / TBIT_PRIMAP] & PRIMAP_BIT(pri % TBIT_PRIMAP));
+#endif /* PRIMAP_LEVEL_2 */
+}
+
+static ER
+bit_schedcb(void)
+{
+	uint_t	pri;
+	QUEUE	*p_queue;
+	TCB		*p_tcb;
+
+	/*
+	 *  dspflgã¨p_schedtskã®æ´åæ§ã®æ¤æ»
+	 */
+	if (dspflg) {
+		if (primap_empty()) {
+			if (p_schedtsk != NULL) {
+				return(E_SYS_LINENO);
+			}
+		}
+		else {
+			if (p_schedtsk != search_schedtsk()) {
+				return(E_SYS_LINENO);
+			}
+		}
+	}
+
+#ifdef PRIMAP_LEVEL_2
+	/*
+	 *  ready_primap1ã¨ready_primap2ã®æ´åæ§ã®æ¤æ»
+	 */
+	for (pri = 0; pri < TNUM_TPRI; pri += TBIT_PRIMAP) {
+		if (ready_primap2[pri / TBIT_PRIMAP] == 0U) {
+			if ((ready_primap1 & PRIMAP_BIT(pri / TBIT_PRIMAP)) != 0U) {
+				return(E_SYS_LINENO);
+			}
+		}
+		else {
+			if ((ready_primap1 & PRIMAP_BIT(pri / TBIT_PRIMAP)) == 0U) {
+				return(E_SYS_LINENO);
+			}
+		}
+	}
+#endif /* PRIMAP_LEVEL_2 */
+
+	/*
+	 *  ready_queueã¨ready_primapã®æ´åæ§ã®æ¤æ»
+	 */
+	for (pri = 0; pri < TNUM_TPRI; pri++) {
+		p_queue = ready_queue[pri].p_next;
+		if (p_queue == &ready_queue[pri]) {
+			if (primap_extract_bit(pri) != 0U) {
+				return(E_SYS_LINENO);
+			}
+		}
+		else {
+			if (primap_extract_bit(pri) == 0U) {
+				return(E_SYS_LINENO);
+			}
+		}
+		while (p_queue != &ready_queue[pri]) {
+			p_tcb = (TCB *) p_queue;
+			if (!VALID_TCB(p_tcb)) {
+				return(E_SYS_LINENO);
+			}
+			if (!TSTAT_RUNNABLE(p_tcb->tstat)) {
+				return(E_SYS_LINENO);
+			}
+			if (p_tcb->priority != pri) {
+				return(E_SYS_LINENO);
+			}
+			p_queue = p_queue->p_next;
+		}
+	}
+	return(E_OK);
 }
 
@@ -162,17 +271,17 @@
 bit_task(ID tskid)
 {
-	TCB			*p_tcb;
-	const TINIB	*p_tinib;
-	uint_t		tstat, pri;
-	TMEVTB		*p_tmevtb;
-	SEMCB		*p_semcb;
-	FLGCB		*p_flgcb;
-	DTQCB		*p_dtqcb;
-	PDQCB		*p_pdqcb;
-	MTXCB		*p_mtxcb;
-	MBFCB		*p_mbfcb;
-	MPFCB		*p_mpfcb;
-
-	if (!(TMIN_TSKID <= (tskid) && (tskid) <= tmax_tskid)) {
+	TCB				*p_tcb;
+	const TINIB		*p_tinib;
+	uint_t			tstat, bpri, pri;
+	TMEVTB			*p_tmevtb;
+	SEMCB			*p_semcb;
+	FLGCB			*p_flgcb;
+	DTQCB			*p_dtqcb;
+	PDQCB			*p_pdqcb;
+	MTXCB			*p_mtxcb;
+	MBFCB			*p_mbfcb;
+	MPFCB			*p_mpfcb;
+
+	if (!VALID_TSKID(tskid)) {
 		return(E_ID);
 	}
@@ -180,8 +289,9 @@
 	p_tinib = p_tcb->p_tinib;
 	tstat = p_tcb->tstat;
+	bpri = p_tcb->bpriority;
 	pri = p_tcb->priority;
 
 	/*
-	 *  åæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ã®æ¤æ»
+	 *  ã¿ã¹ã¯åæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ã®æ¤æ»
 	 */
 	if (p_tinib != &(tinib_table[INDEX_TSK(tskid)])) {
@@ -214,15 +324,16 @@
 
 	/*
-	 *  actqueã®æ¤æ»
-	 */
-	if (TSTAT_DORMANT(tstat) && p_tcb->actque) {
+	 *  ãã¼ã¹åªå
+åº¦ã®æ¤æ»
+	 */
+	if (bpri >= TNUM_TPRI) {
 		return(E_SYS_LINENO);
 	}
 
 	/*
-	 *  ã¿ã¹ã¯åªå
+	 *  ç¾å¨ã®åªå
 åº¦ã®æ¤æ»
 	 */
-	if (pri >= TNUM_TPRI) {
+	if (pri > bpri) {
 		return(E_SYS_LINENO);
 	}
@@ -241,8 +352,11 @@
 	 */
 	if (TSTAT_DORMANT(tstat)) {
-		if (!(pri == p_tinib->ipriority)
-					&& (p_tcb->wupque == false)
-					&& (p_tcb->raster == false)
-					&& (p_tcb->enater == true)) {
+		if (!(bpri == p_tinib->ipriority
+			  		&& pri == p_tinib->ipriority
+					&& p_tcb->actque == false
+					&& p_tcb->wupque == false
+					&& p_tcb->raster == false
+					&& p_tcb->enater == true
+					&& p_tcb->p_lastmtx == NULL)) {
 			return(E_SYS_LINENO);
 		}
@@ -394,4 +508,13 @@
 			return(E_SYS_LINENO);
 			break;
+		}
+	}
+
+	/*
+	 *  p_lastmtxã®æ¤æ»
+	 */
+	if (p_tcb->p_lastmtx != NULL) {
+		if (!VALID_MTXCB(p_tcb->p_lastmtx)) {
+			return(E_SYS_LINENO);
 		}
 	}
@@ -424,9 +547,9 @@
 	SEMCB			*p_semcb;
 	const SEMINIB	*p_seminib;
-	uint_t			semcnt;
+	uint_t			semcnt, pri;
 	QUEUE			*p_queue;
 	TCB				*p_tcb;
 
-	if (!(TMIN_SEMID <= (semid) && (semid) <= tmax_semid)) {
+	if (!VALID_SEMID(semid)) {
 		return(E_ID);
 	}
@@ -436,5 +559,5 @@
 
 	/*
-	 *  åæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ã®æ¤æ»
+	 *  ã»ããã©åæåãã­ãã¯ã¸ã®ãã¤ã³ã¿ã®æ¤æ»
 	 */
 	if (p_seminib != &(seminib_table[INDEX_SEM(semid)])) {
@@ -454,16 +577,33 @@
 	if (semcnt == 0) {
 		p_queue = p_semcb->wait_queue.p_next;
+		pri = TMIN_TPRI;
 		while (p_queue != &(p_semcb->wait_queue)) {
 			p_tcb = (TCB *) p_queue;
+			if (!VALID_TCB(p_tcb)) {
+				return(E_SYS_LINENO);
+			}
+
+			/*
+			 *  ã­ã¥ã¼ãã¿ã¹ã¯åªå
+åº¦é ã«ãªã£ã¦ãããã®æ¤æ»
+			 */
+			if ((p_seminib->sematr & TA_TPRI) != 0U) {
+				if (p_tcb->priority < pri) {
+					return(E_SYS_LINENO);
+				}
+			}
+			pri = p_tcb->priority;
+
+			/*
+			 *  ã¿ã¹ã¯ç¶æ
+ã®æ¤æ»
+			 */
+			if (p_tcb->tstat != TS_WAITING_SEM) {
+				return(E_SYS_LINENO);
+			}
+			if (p_semcb != ((WINFO_SEM *)(p_tcb->p_winfo))->p_semcb) {
+				return(E_SYS_LINENO);
+			}
 			p_queue = p_queue->p_next;
-			if (!VALID_TCB(p_tcb)) {
-				return(E_SYS_LINENO);
-			}
-			if (p_tcb->tstat != TS_WAITING_SEM) {
-				return(E_SYS_LINENO);
-			}
-			if (p_semcb != ((WINFO_SEM *)(p_tcb->p_winfo))->p_semcb) {
-				return(E_SYS_LINENO);
-			}
 		}
 	}
@@ -485,4 +625,12 @@
 	ID		semid;
 	ER		ercd;
+
+	/*
+	 *  ã¹ã±ã¸ã¥ã¼ãªã³ã°ã®ããã®ãã¼ã¿æ§é ã®æ¤æ»
+	 */
+	ercd = bit_schedcb();
+	if (ercd != E_OK) {
+		return(ercd);
+	}
 
 	/*
Index: asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf1.c
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf1.c	(revision 302)
+++ asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf1.c	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2014-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2014-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_messagebuf1.c 310 2015-02-08 13:46:46Z ertl-hiro $
+ *  $Id: test_messagebuf1.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -178,5 +178,5 @@
  *		assert(strncmp(buf1, string3, 11) == 0)
  *		snd_mbf(MBF1, string1, 16)		... (A-3)(C-3)ï¼ä½¿ç¨ï¼16ã27,0ã7
- *		tslp_tsk(1000U) -> E_TMOUT
+ *		tslp_tsk(2 * TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2ï¼ç¶ãï¼==
  *	15:	slp_tsk()
@@ -185,5 +185,5 @@
  *	== TASK1ï¼ç¶ãï¼==
  *	17:	wup_tsk(TASK2)
- *		tslp_tsk(1000U) -> E_TMOUT
+ *		tslp_tsk(TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2ï¼ç¶ãï¼==
  *	18:	snd_mbf(MBF1, string3, 4)		... (A-4)
@@ -285,5 +285,5 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = tslp_tsk(1000U);
+	ercd = tslp_tsk(2 * TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
@@ -292,5 +292,5 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = tslp_tsk(1000U);
+	ercd = tslp_tsk(TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
Index: asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf1.cfg
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf1.cfg	(revision 302)
+++ asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf1.cfg	(revision 306)
@@ -2,10 +2,7 @@
  *		ã¡ãã»ã¼ã¸ãããã¡ã®ãã¹ã(1)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
  *
- *  $Id: test_messagebuf1.cfg 263 2014-10-05 13:30:34Z ertl-hiro $
+ *  $Id: test_messagebuf1.cfg 572 2016-02-01 14:40:09Z ertl-hiro $
  */
-INCLUDE("target_timer.cfg");
-INCLUDE("syssvc/syslog.cfg");
-INCLUDE("syssvc/banner.cfg");
-INCLUDE("syssvc/serial.cfg");
+INCLUDE("tecsgen.cfg");
 
 #include "test_messagebuf1.h"
Index: asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf1.h
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf1.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf1.h	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2014-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_messagebuf1.h 2 2014-01-11 03:50:35Z ertl-hiro $
+ *  $Id: test_messagebuf1.h 737 2016-04-05 13:11:23Z ertl-hiro $
  */
 
@@ -80,4 +80,13 @@
 #endif /* STACK_SIZE */
 
+#ifndef TEST_TIME_CP
+#define TEST_TIME_CP	50000U		/* ãã§ãã¯ãã¤ã³ãå°éæ
+å ±ã®åºåæé */
+#endif /* TEST_TIME_CP */
+
+#ifndef TEST_TIME_PROC
+#define TEST_TIME_PROC	1000U		/* ãã§ãã¯ãã¤ã³ããéããªãå ´åã®æé */
+#endif /* TEST_TIME_PROC */
+
 /*
  *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
Index: asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf2.c
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf2.c	(revision 302)
+++ asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf2.c	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2014-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2014-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_messagebuf2.c 310 2015-02-08 13:46:46Z ertl-hiro $
+ *  $Id: test_messagebuf2.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -132,5 +132,5 @@
  *	1:	act_tsk(TASK2)
  *		act_tsk(TASK3)
- *		tslp_tsk(1000U) -> E_TMOUT
+ *		tslp_tsk(2 * TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2-1ï¼åªå
 åº¦ï¼ä¸­ï¼1åã ==
@@ -141,10 +141,10 @@
  *	== TASK1ï¼ç¶ãï¼==
  *	4:	ter_tsk(TASK2)									... (A-1)
- *		tslp_tsk(1000U) -> E_TMOUT
+ *		tslp_tsk(2 * TEST_TIME_PROC) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK1ï¼ç¶ãï¼==
  *	5:	rcv_mbf(MBF1, buf1) -> 26
  *		assert(strncmp(buf1, string2, 26) == 0)
  *		act_tsk(TASK2)
- *		tslp_tsk(1000U) -> E_TMOUT
+ *		tslp_tsk(2 * TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2-2ï¼åªå
 åº¦ï¼ä¸­ï¼2åã ==
@@ -172,5 +172,5 @@
  *		assert(strncmp(buf1, string3, 10) == 0)
  *		act_tsk(TASK2)
- *		tslp_tsk(1000U) -> E_TMOUT
+ *		tslp_tsk(2 * TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2-4ï¼åªå
 åº¦ï¼ä¸­ï¼4åã ==
@@ -180,5 +180,5 @@
  *	== TASK1ï¼ç¶ãï¼==
  *	18:	rel_wai(TASK2)									... (B-1)
- *		tslp_tsk(1000U) -> E_TMOUT
+ *		tslp_tsk(TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2-4ï¼ç¶ãï¼==
  *	19:	slp_tsk()
@@ -187,5 +187,5 @@
  *		assert(strncmp(buf1, string2, 26) == 0)
  *		wup_tsk(TASK2)
- *		tslp_tsk(1000U) -> E_TMOUT
+ *		tslp_tsk(2 * TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2-4ï¼ç¶ãï¼==
  *	21:	snd_mbf(MBF1, string1, 26) -> E_RLWAI
@@ -212,5 +212,5 @@
  *	31:	rcv_mbf(MBF1, buf1) -> 10
  *		assert(strncmp(buf1, string3, 10) == 0)
- *		tslp_tsk(1000U) -> E_TMOUT
+ *		tslp_tsk(2 * TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2-4ï¼ç¶ãï¼==
  *	32:	snd_mbf(MBF1, string1, 26) -> E_RLWAI
@@ -218,5 +218,5 @@
  *	33:	snd_mbf(MBF1, string2, 26)
  *	== TASK1ï¼ç¶ãï¼==
- *	34:	sta_alm(ALM1, 1000U)
+ *	34:	sta_alm(ALM1, TEST_TIME_PROC) ...  ALM1-1ãå®è¡éå§ããã¾ã§
  *		slp_tsk()
  *	== ALM1-1 ==
@@ -225,5 +225,5 @@
  *		RETURN
  *	== TASK1ï¼ç¶ãï¼==
- *	36:	tslp_tsk(1000U) -> E_TMOUT
+ *	36:	tslp_tsk(TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2-4ï¼ç¶ãï¼==
  *	37:	slp_tsk()
@@ -232,5 +232,5 @@
  *		assert(strncmp(buf1, string2, 26) == 0)
  *		wup_tsk(TASK2)
- *		tslp_tsk(1000U) -> E_TMOUT
+ *		tslp_tsk(2 * TEST_TIME_CP) -> E_TMOUT ... TASK1ãå®è¡åéããã¾ã§
  *	== TASK2-4ï¼ç¶ãï¼==
  *	39:	snd_mbf(MBF1, string1, 26) -> E_RLWAI
@@ -238,5 +238,5 @@
  *	40:	snd_mbf(MBF1, string3, 10)
  *	== TASK1ï¼ç¶ãï¼==
- *	41:	sta_alm(ALM1, 1000U)
+ *	41:	sta_alm(ALM1, TEST_TIME_PROC) ...  ALM1-2ãå®è¡éå§ããã¾ã§
  *		slp_tsk()
  *	== ALM1-2 ==
@@ -256,5 +256,5 @@
  *	48:	snd_mbf(MBF1, string3, 10)
  *	== TASK3ï¼ç¶ãï¼==
- *	49:	sta_alm(ALM1, 1000U)
+ *	49:	sta_alm(ALM1, TEST_TIME_PROC) ...  ALM1-3ãå®è¡éå§ããã¾ã§
  *		slp_tsk()
  *	== ALM1-3 ==
@@ -267,13 +267,15 @@
  *		slp_tsk()
  *	== TASK2-4ï¼ç¶ãï¼==
-  *	52:	tsnd_mbf(MBF1, string1, 26, 1000U) -> E_TMOUT	... (D-1)
+ *	52:	tsnd_mbf(MBF1, string1, 26, TEST_TIME_CP) -> E_TMOUT	... (D-1)
+ *											... TASK2-4ãå®è¡åéããã¾ã§
  *	== TASK3ï¼ç¶ãï¼==
  *	53:	snd_mbf(MBF1, string2, 26)
  *	== TASK2-4ï¼ç¶ãï¼==
- *	54:	tslp_tsk(1000U) -> E_TMOUT
+ *	54:	tslp_tsk(2 * TEST_TIME_PROC) -> E_TMOUT ... TASK2-4ãå®è¡åéããã¾ã§
  *	== TASK2-4ï¼ç¶ãï¼==
  *	55:	rcv_mbf(MBF1, buf1) -> 26
  *		assert(strncmp(buf1, string2, 26) == 0)
- *	56:	tsnd_mbf(MBF1, string1, 26, 1000U) -> E_TMOUT	... (D-2)
+ *	56:	tsnd_mbf(MBF1, string1, 26, TEST_TIME_CP) -> E_TMOUT	... (D-2)
+ *											... TASK2-4ãå®è¡åéããã¾ã§
  *	== TASK3ï¼ç¶ãï¼==
  *	57:	snd_mbf(MBF1, string3, 10)
@@ -285,5 +287,6 @@
  *	60:	wup_tsk(TASK2)
  *	== TASK2-4ï¼ç¶ãï¼==
- *	61:	tsnd_mbf(MBF1, string1, 26, 1000U) -> E_TMOUT	... (D-3)
+ *	61:	tsnd_mbf(MBF1, string1, 26, 4 * TEST_TIME_CP) -> E_TMOUT	... (D-3)
+ *											... TASK2-4ãå®è¡åéããã¾ã§
  *	== TASK3ï¼ç¶ãï¼==
  *	62:	wup_tsk(TASK1)
@@ -377,5 +380,5 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = tslp_tsk(1000U);
+	ercd = tslp_tsk(2 * TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
@@ -384,5 +387,5 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = tslp_tsk(1000U);
+	ercd = tslp_tsk(TEST_TIME_PROC);
 	check_ercd(ercd, E_TMOUT);
 
@@ -396,5 +399,5 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = tslp_tsk(1000U);
+	ercd = tslp_tsk(2 * TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
@@ -419,5 +422,5 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = tslp_tsk(1000U);
+	ercd = tslp_tsk(2 * TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
@@ -426,5 +429,5 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = tslp_tsk(1000U);
+	ercd = tslp_tsk(TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
@@ -438,5 +441,5 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = tslp_tsk(1000U);
+	ercd = tslp_tsk(2 * TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
@@ -458,9 +461,9 @@
 	check_assert(strncmp(buf1, string3, 10) == 0);
 
-	ercd = tslp_tsk(1000U);
+	ercd = tslp_tsk(2 * TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
 	check_point(34);
-	ercd = sta_alm(ALM1, 1000U);
+	ercd = sta_alm(ALM1, TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
@@ -469,5 +472,5 @@
 
 	check_point(36);
-	ercd = tslp_tsk(1000U);
+	ercd = tslp_tsk(TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
@@ -481,9 +484,9 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = tslp_tsk(1000U);
+	ercd = tslp_tsk(2 * TEST_TIME_CP);
 	check_ercd(ercd, E_TMOUT);
 
 	check_point(41);
-	ercd = sta_alm(ALM1, 1000U);
+	ercd = sta_alm(ALM1, TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
@@ -594,9 +597,9 @@
 
 		check_point(52);
-		ercd = tsnd_mbf(MBF1, string1, 26, 1000U);
+		ercd = tsnd_mbf(MBF1, string1, 26, TEST_TIME_CP);
 		check_ercd(ercd, E_TMOUT);
 
 		check_point(54);
-		ercd = tslp_tsk(1000U);
+		ercd = tslp_tsk(TEST_TIME_PROC);
 		check_ercd(ercd, E_TMOUT);
 
@@ -608,5 +611,5 @@
 
 		check_point(56);
-		ercd = tsnd_mbf(MBF1, string1, 26, 1000U);
+		ercd = tsnd_mbf(MBF1, string1, 26, TEST_TIME_CP);
 		check_ercd(ercd, E_TMOUT);
 
@@ -616,5 +619,5 @@
 
 		check_point(61);
-		ercd = tsnd_mbf(MBF1, string1, 26, 1000U);
+		ercd = tsnd_mbf(MBF1, string1, 26, 4 * TEST_TIME_CP);
 		check_ercd(ercd, E_TMOUT);
 
@@ -708,5 +711,5 @@
 
 	check_point(49);
-	ercd = sta_alm(ALM1, 1000U);
+	ercd = sta_alm(ALM1, TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
Index: asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf2.cfg
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf2.cfg	(revision 302)
+++ asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf2.cfg	(revision 306)
@@ -2,10 +2,7 @@
  *		ã¡ãã»ã¼ã¸ãããã¡ã®ãã¹ã(2)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
  *
- *  $Id: test_messagebuf2.cfg 327 2015-06-21 06:42:01Z ertl-hiro $
+ *  $Id: test_messagebuf2.cfg 572 2016-02-01 14:40:09Z ertl-hiro $
  */
-INCLUDE("target_timer.cfg");
-INCLUDE("syssvc/syslog.cfg");
-INCLUDE("syssvc/banner.cfg");
-INCLUDE("syssvc/serial.cfg");
+INCLUDE("tecsgen.cfg");
 
 #include "test_messagebuf2.h"
Index: asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf2.h
===================================================================
--- asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf2.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/messagebuf/test/test_messagebuf2.h	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2014-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_messagebuf2.h 2 2014-01-11 03:50:35Z ertl-hiro $
+ *  $Id: test_messagebuf2.h 737 2016-04-05 13:11:23Z ertl-hiro $
  */
 
@@ -80,4 +80,13 @@
 #endif /* STACK_SIZE */
 
+#ifndef TEST_TIME_CP
+#define TEST_TIME_CP	50000U		/* ãã§ãã¯ãã¤ã³ãå°éæ
+å ±ã®åºåæé */
+#endif /* TEST_TIME_CP */
+
+#ifndef TEST_TIME_PROC
+#define TEST_TIME_PROC	1000U		/* ãã§ãã¯ãã¤ã³ããéããªãå ´åã®æé */
+#endif /* TEST_TIME_PROC */
+
 /*
  *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
Index: asp3_wo_tecs/trunk/extension/ovrhdr/include/kernel.h
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/include/kernel.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/include/kernel.h	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: kernel.h 463 2015-10-18 14:25:55Z ertl-hiro $
+ *  $Id: kernel.h 654 2016-02-20 12:59:31Z ertl-hiro $
  */
 
@@ -567,6 +567,6 @@
 #define TKERNEL_MAKER	UINT_C(0x0118)	/* ã«ã¼ãã«ã®ã¡ã¼ã«ã¼ã³ã¼ã */
 #define TKERNEL_PRID	UINT_C(0x0007)	/* ã«ã¼ãã«ã®è­å¥çªå· */
-#define TKERNEL_SPVER	UINT_C(0xf630)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
-#define TKERNEL_PRVER	UINT_C(0x30b0)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_SPVER	UINT_C(0xf631)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_PRVER	UINT_C(0x3010)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
 
 /*
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/Makefile.kernel
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/Makefile.kernel	(revision 302)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/kernel/Makefile.kernel	(revision 306)
@@ -6,5 +6,5 @@
 #  Copyright (C) 2003 by Embedded and Real-Time Systems Laboratory
 #                              Toyohashi Univ. of Technology, JAPAN
-#  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+#  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
 #              Graduate School of Information Science, Nagoya Univ., JAPAN
 # 
@@ -53,5 +53,5 @@
 #  ã®è²¬ä»»ãè² ããªãï¼
 # 
-#  $Id: Makefile.kernel 236 2014-09-28 16:24:33Z ertl-hiro $
+#  $Id: Makefile.kernel 554 2016-01-17 13:21:59Z ertl-hiro $
 # 
 
@@ -134,24 +134,24 @@
 #  çæããããªãã¸ã§ã¯ããã¡ã¤ã«ã®ä¾å­é¢ä¿ã®å®ç¾©
 #
-$(startup) $(startup:.o=.s) $(startup:.o=.d): startup.c
-$(task) $(task:.o=.s) $(task:.o=.d): task.c
-$(taskhook) $(taskhook:.o=.s) $(taskhook:.o=.d): taskhook.c
-$(wait) $(wait:.o=.s) $(wait:.o=.d): wait.c
-$(time_event) $(time_event:.o=.s) $(time_event:.o=.d): time_event.c
-$(task_manage) $(task_manage:.o=.s) $(task_manage:.o=.d): task_manage.c
-$(task_refer) $(task_refer:.o=.s) $(task_refer:.o=.d): task_refer.c
-$(task_sync) $(task_sync:.o=.s) $(task_sync:.o=.d): task_sync.c
-$(task_term) $(task_term:.o=.s) $(task_term:.o=.d): task_term.c
-$(semaphore) $(semaphore:.o=.s) $(semaphore:.o=.d): semaphore.c
-$(eventflag) $(eventflag:.o=.s) $(eventflag:.o=.d): eventflag.c
-$(dataqueue) $(dataqueue:.o=.s) $(dataqueue:.o=.d): dataqueue.c
-$(pridataq) $(pridataq:.o=.s) $(pridataq:.o=.d): pridataq.c
-$(mutex) $(mutex:.o=.s) $(mutex:.o=.d): mutex.c
-$(mempfix) $(mempfix:.o=.s) $(mempfix:.o=.d): mempfix.c
-$(time_manage) $(time_manage:.o=.s) $(time_manage:.o=.d): time_manage.c
-$(cyclic) $(cyclic:.o=.s) $(cyclic:.o=.d): cyclic.c
-$(alarm) $(alarm:.o=.s) $(alarm:.o=.d): alarm.c
-$(overrun) $(overrun:.o=.s) $(overrun:.o=.d): overrun.c
-$(sys_manage) $(sys_manage:.o=.s) $(sys_manage:.o=.d): sys_manage.c
-$(interrupt) $(interrupt:.o=.s) $(interrupt:.o=.d): interrupt.c
-$(exception) $(exception:.o=.s) $(exception:.o=.d): exception.c
+$(startup) $(startup:.o=.s): startup.c
+$(task) $(task:.o=.s): task.c
+$(taskhook) $(taskhook:.o=.s): taskhook.c
+$(wait) $(wait:.o=.s): wait.c
+$(time_event) $(time_event:.o=.s): time_event.c
+$(task_manage) $(task_manage:.o=.s): task_manage.c
+$(task_refer) $(task_refer:.o=.s): task_refer.c
+$(task_sync) $(task_sync:.o=.s): task_sync.c
+$(task_term) $(task_term:.o=.s): task_term.c
+$(semaphore) $(semaphore:.o=.s): semaphore.c
+$(eventflag) $(eventflag:.o=.s): eventflag.c
+$(dataqueue) $(dataqueue:.o=.s): dataqueue.c
+$(pridataq) $(pridataq:.o=.s): pridataq.c
+$(mutex) $(mutex:.o=.s): mutex.c
+$(mempfix) $(mempfix:.o=.s): mempfix.c
+$(time_manage) $(time_manage:.o=.s): time_manage.c
+$(cyclic) $(cyclic:.o=.s): cyclic.c
+$(alarm) $(alarm:.o=.s): alarm.c
+$(overrun) $(overrun:.o=.s): overrun.c
+$(sys_manage) $(sys_manage:.o=.s): sys_manage.c
+$(interrupt) $(interrupt:.o=.s): interrupt.c
+$(exception) $(exception:.o=.s): exception.c
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel.tf	(revision 302)
+++ 	(revision )
@@ -1,430 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2015 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: kernel.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  kernel_cfg.hã®å
-é ­é¨åã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-/* kernel_cfg.h */$NL$
-#ifndef TOPPERS_KERNEL_CFG_H$NL$
-#define TOPPERS_KERNEL_CFG_H$NL$
-
-$
-$  kernel_cfg.cã®å
-é ­é¨åã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/* kernel_cfg.c */$NL$
-#include "kernel/kernel_int.h"$NL$
-#include "kernel_cfg.h"$NL$
-$NL$
-
-#if !(TKERNEL_PRID == 0x0007U && (TKERNEL_PRVER & 0xf000U) == 0x3000U)$NL$
-#error The kernel does not match this configuration file.$NL$
-#endif$NL$
-$NL$
-
-$ 
-$  ã¤ã³ã¯ã«ã¼ããã£ã¬ã¯ãã£ãï¼#includeï¼
-$ 
-/*$NL$
-$SPC$*  Include Directives (#include)$NL$
-$SPC$*/$NL$
-$NL$
-$INCLUDES$
-$NL$
-
-$
-$  ã¹ã¿ãã¯é åã®ç¢ºä¿é¢æ°
-$
-$IF !ISFUNCTION("ALLOC_STACK")$
-$FUNCTION ALLOC_STACK$
-$	// å¤§ããæ¹ã«ä¸¸ãããµã¤ãºã§ç¢ºä¿ããï¼»NGKI1050ï¼½ï¼»NGKI3220ï¼½
-	static STK_T $ARGV[1]$[COUNT_STK_T($ARGV[2]$)];$NL$
-	$RESULT = FORMAT("ROUND_STK_T(%1%)", ARGV[2])$
-$END$
-$END$
-
-$
-$  éç¥ãã³ãã©ã®çæé¢æ°
-$
-$FUNCTION GENERATE_NFYHDR$
-$	// ãã©ã¡ã¼ã¿ãå¤æ°ã«æ ¼ç´
-	$nfymode = ARGV[1]$
-	$nfymode1 = nfymode & 0x0f$
-	$nfymode2 = nfymode & ~0x0f$
-	$par1 = ARGV[2]$
-	$par2 = ARGV[3]$
-	$text_line = ARGV[6]$
-	$objid = ARGV[7]$
-	$apiname = ARGV[8]$
-
-$	// éç¥å¦çã®ãã©ã¡ã¼ã¿æ°ã«ããè£æ­£å¦ç
-	$IF nfymode == TNFY_HANDLER || nfymode1 == TNFY_SETVAR
-								|| nfymode1 == TNFY_SETFLG
-								|| nfymode1 == TNFY_SNDDTQ$
-$		// éç¥å¦çã®ãã©ã¡ã¼ã¿ã2ã¤ã®å ´å
-		$numpar = 2$
-		$epar1 = ARGV[4]$
-		$epar2 = ARGV[5]$
-	$ELSE$
-$		// éç¥å¦çã®ãã©ã¡ã¼ã¿ã1ã¤ã®å ´å
-		$numpar = 1$
-		$epar1 = ARGV[3]$
-		$epar2 = ARGV[4]$
-	$END$
-
-$	// ãã©ã¡ã¼ã¿æ°ã®ãã§ãã¯
-	$IF (numpar == 2 && !LENGTH(par2))
-					|| (nfymode2 != 0 && !LENGTH(epar1))
-					|| (nfymode2 == TENFY_SETFLG && !LENGTH(epar2))$
-$		// ãã©ã¡ã¼ã¿ãè¶³ããªãå ´å
-		$ERROR text_line$
-			$FORMAT(_("too few parameters for %1% `%2%\' of `%3%\' in %4%"),
-										"nfymode", nfymode, objid, apiname)$
-		$END$
-	$ELIF (nfymode2 == 0 && LENGTH(epar1))
-					|| (nfymode2 != TENFY_SETFLG && LENGTH(epar2))$
-$		// ãã©ã¡ã¼ã¿ãå¤ãããå ´å
-		$ERROR text_line$
-			$FORMAT(_("too many parameters for %1% `%2%\' of `%3%\' in %4%"),
-										"nfymode", nfymode, objid, apiname)$
-		$END$
-	$ELIF nfymode == TNFY_HANDLER$
-$		// ã¿ã¤ã ã¤ãã³ããã³ãã©ã®å¼åºã
-		$funcname = FORMAT("(NFYHDR)(%s)", par2)$
-	$ELSE$
-$		// éç¥ãã³ãã©ã®é¢æ°å
-		$funcname = CONCAT("_kernel_nfyhdr_", objid)$
-
-$		// ã¨ã©ã¼éç¥ã®ããã®å¤æ°ã®ã¢ãã¬ã¹ã¨ãªãã¸ã§ã¯ãIDãæ ¼ç´ãã
-$		// å¤æ°ã®çæï¼ã¨ã©ã¼ãã§ãã¯ã®ããã«å¿
-è¦ï¼
-		$IF nfymode2 == TENFY_SETVAR ||  nfymode2 == TENFY_INCVAR$
-			intptr_t *const $funcname$_p_evar =
-			$SPC$(intptr_t *)($epar1$);$NL$$NL$
-		$ELIF nfymode2 == TENFY_ACTTSK || nfymode2 == TENFY_WUPTSK$
-			const ID $funcname$_etskid = $epar1$;$NL$$NL$
-		$ELIF nfymode2 == TENFY_SIGSEM$
-			const ID $funcname$_esemid = $epar1$;$NL$$NL$
-		$ELIF nfymode2 == TENFY_SETFLG$
-			const ID $funcname$_eflgid = $epar1$;$NL$$NL$
-		$ELIF nfymode2 == TENFY_SNDDTQ$
-			const ID $funcname$_edtqid = $epar1$;$NL$$NL$
-		$END$
-
-$		// é¢æ°ã®å
-é ­é¨åã®çæ
-		static void$NL$
-		$funcname$(intptr_t exinf)$NL$
-		{$NL$
-
-		$IF nfymode2 == 0$
-$			// ã¨ã©ã¼éç¥ããªãå ´å
-			$error_code = "(void) "$
-		$ELSE$
-$			// ã¨ã©ã¼éç¥ãããå ´å
-			$TAB$ER		ercd;$NL$
-			$NL$
-			$error_code = "ercd = "$
-		$END$
-
-$		// ã¤ãã³ãéç¥å¦çã®å¦ç
-		$IF nfymode1 == TNFY_SETVAR && nfymode2 == 0$
-$			// å¤æ°ã®è¨­å®
-			$TAB$*((intptr_t *) exinf) = ($par2$);$NL$
-		$ELIF nfymode1 == TNFY_INCVAR && nfymode2 == 0$
-$			// å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã
-			$TAB$*((intptr_t *) exinf) += 1;$NL$
-		$ELIF nfymode1 == TNFY_ACTTSK$
-$			// ã¿ã¹ã¯ã®èµ·å
-			$TAB$$error_code$act_tsk((ID) exinf);$NL$
-		$ELIF nfymode1 == TNFY_WUPTSK$
-$			// ã¿ã¹ã¯ã®èµ·åº
-			$TAB$$error_code$wup_tsk((ID) exinf);$NL$
-		$ELIF nfymode1 == TNFY_SIGSEM$
-$			// ã»ããã©ã®è¿å´
-			$TAB$$error_code$sig_sem((ID) exinf);$NL$
-		$ELIF nfymode1 == TNFY_SETFLG$
-$			// ã¤ãã³ããã©ã°ã®ã»ãã
-			$TAB$$error_code$set_flg(((ID) exinf), $par2$);$NL$
-		$ELIF nfymode1 == TNFY_SNDDTQ$
-$			// ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
-			$TAB$$error_code$psnd_dtq(((ID) exinf), $par2$);$NL$
-		$ELSE$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-									"nfymode", nfymode, objid, apiname)$
-			$END$
-		$END$
-
-		$IF nfymode2 != 0$
-$			// ã¨ã©ã¼éç¥å¦çã®å¦ç
-			$TAB$if (ercd != E_OK) {$NL$
-
-			$IF nfymode2 == TENFY_SETVAR$
-$				// å¤æ°ã®è¨­å®
-				$TAB$$TAB$*$funcname$_p_evar = (intptr_t) ercd;$NL$
-			$ELIF nfymode2 == TENFY_INCVAR$
-$				// å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã
-				$TAB$$TAB$*$funcname$_p_evar += 1;$NL$
-			$ELIF nfymode2 == TENFY_ACTTSK$
-$				// ã¿ã¹ã¯ã®èµ·å
-				$TAB$$TAB$(void) act_tsk($funcname$_etskid);$NL$
-			$ELIF nfymode2 == TENFY_WUPTSK$
-$				// ã¿ã¹ã¯ã®èµ·åº
-				$TAB$$TAB$(void) wup_tsk($funcname$_etskid);$NL$
-			$ELIF nfymode2 == TENFY_SIGSEM$
-$				// ã»ããã©ã®è¿å´
-				$TAB$$TAB$(void) sig_sem($funcname$_esemid);$NL$
-			$ELIF nfymode2 == TENFY_SETFLG$
-$				// ã¤ãã³ããã©ã°ã®ã»ãã
-				$TAB$$TAB$(void) set_flg($funcname$_eflgid, $epar2$);$NL$
-			$ELIF nfymode2 == TENFY_SNDDTQ$
-$				// ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
-				$TAB$$TAB$(void) psnd_dtq
-								($funcname$_edtqid, (intptr_t) ercd);$NL$
-			$ELSE$
-				$ERROR text_line$E_PAR:$SPC$
-					$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"nfymode", nfymode, objid, apiname)$
-				$END$
-			$END$
-
-			$TAB$}$NL$
-		$END$
-
-$		// é¢æ°ã®æ«å°¾é¨åã®çæ
-		}$NL$
-		$NL$
-	$END$
-	$RESULT = funcname$
-$END$
-
-$
-$  åæ©è½ã¢ã¸ã¥ã¼ã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³
-$
-$INCLUDE "kernel/task.tf"$
-$INCLUDE "kernel/semaphore.tf"$
-$INCLUDE "kernel/eventflag.tf"$
-$INCLUDE "kernel/dataqueue.tf"$
-$INCLUDE "kernel/pridataq.tf"$
-$INCLUDE "kernel/mutex.tf"$
-$INCLUDE "kernel/mempfix.tf"$
-$INCLUDE "kernel/cyclic.tf"$
-$INCLUDE "kernel/alarm.tf"$
-$INCLUDE "kernel/overrun.tf"$
-$INCLUDE "kernel/interrupt.tf"$
-$INCLUDE "kernel/exception.tf"$
-
-$ 
-$  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é å
-$ 
-/*$NL$
-$SPC$*  Stack Area for Non-task Context$NL$
-$SPC$*/$NL$
-$NL$
-
-$IF !LENGTH(ICS.ORDER_LIST)$
-$	// DEF_ICSããªãå ´åã®ããã©ã«ãå¤ã®è¨­å®
-	#ifdef DEFAULT_ISTK$NL$
-	$NL$
-	#define TOPPERS_ISTKSZ		DEFAULT_ISTKSZ$NL$
-	#define TOPPERS_ISTK		DEFAULT_ISTK$NL$
-	$NL$
-	#else /* DEAULT_ISTK */$NL$
-	$NL$
-	$istksz = ALLOC_STACK("_kernel_istack", "DEFAULT_ISTKSZ")$$NL$
-	#define TOPPERS_ISTKSZ		$istksz$$NL$
-	#define TOPPERS_ISTK		_kernel_istack$NL$
-	$NL$
-	#endif /* DEAULT_ISTK */$NL$
-$ELSE$
-
-$	// éçAPIãDEF_ICSããè¤æ°ããï¼E_OBJï¼ï¼»NGKI3216ï¼½
-	$IF LENGTH(ICS.ORDER_LIST) > 1$
-		$ERROR$E_OBJ: $FORMAT(_("too many %1%"), "DEF_ICS")$$END$
-	$END$
-
-$	// istkszã0ä»¥ä¸ãï¼ã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_ISTKSZï¼ããã
-$	// å°ããå ´åï¼E_PARï¼ï¼»NGKI3254ï¼½
-	$IF ICS.ISTKSZ[1] <= 0 || (TARGET_MIN_ISTKSZ
-									&& ICS.ISTKSZ[1] < TARGET_MIN_ISTKSZ)$
-		$ERROR ICS.TEXT_LINE[1]$E_PAR:$SPC$
-			$FORMAT(_("too small %1% `%2%\' in %3%"),
-						"istksz", ICS.ISTKSZ[1], "DEF_ICS")$
-		$END$
-	$END$
-
-$ 	// istkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼ï¼»NGKI3222ï¼½
-	$IF !EQ(ICS.ISTK[1], "NULL") && CHECK_STKSZ_ALIGN
-							&& (ICS.ISTKSZ[1] & (CHECK_STKSZ_ALIGN - 1))$
-		$ERROR ICS.TEXT_LINE[1]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' in %3% is not aligned"),
-						"istksz", ICS.ISTKSZ[1], "DEF_ICS")$
-		$END$
-	$END$
-
-	$IF EQ(ICS.ISTK[1], "NULL")$
-$		// ã¹ã¿ãã¯é åã®èªåå²ä»ã
-		$istksz = ALLOC_STACK("_kernel_istack", ICS.ISTKSZ[1])$$NL$
-		#define TOPPERS_ISTKSZ		$istksz$$NL$
-		#define TOPPERS_ISTK		_kernel_istack$NL$
-	$ELSE$
-		#define TOPPERS_ISTKSZ		($ICS.ISTKSZ[1]$)$NL$
-		#define TOPPERS_ISTK		(void *)($ICS.ISTK[1]$)$NL$
-	$END$
-$END$
-$NL$
-
-$ éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é å
-const size_t	_kernel_istksz = TOPPERS_ISTKSZ;$NL$
-STK_T *const	_kernel_istk = TOPPERS_ISTK;$NL$
-$NL$
-#ifdef TOPPERS_ISTKPT$NL$
-STK_T *const	_kernel_istkpt = TOPPERS_ISTKPT(TOPPERS_ISTK, TOPPERS_ISTKSZ);$NL$
-#endif /* TOPPERS_ISTKPT */$NL$
-$NL$
-
-$ 
-$  ã¿ã¤ã ã¤ãã³ãç®¡ç
-$ 
-/*$NL$
-$SPC$*  Time Event Management$NL$
-$SPC$*/$NL$
-$NL$
-TMEVTN   _kernel_tmevt_heap[1 + TNUM_TSKID + TNUM_CYCID + TNUM_ALMID];$NL$
-$NL$
-
-$ 
-$  åã¢ã¸ã¥ã¼ã«ã®åæåé¢æ°
-$ 
-/*$NL$
-$SPC$*  Module Initialization Function$NL$
-$SPC$*/$NL$
-$NL$
-void$NL$
-_kernel_initialize_object(void)$NL$
-{$NL$
-$FOREACH func (initfuncs)$
-	$TAB$$func$$NL$
-$END$
-}$NL$
-$NL$
-
-$ 
-$  åæåã«ã¼ãã³ã®å®è¡é¢æ°
-$ 
-/*$NL$
-$SPC$*  Initialization Routine$NL$
-$SPC$*/$NL$
-$NL$
-void$NL$
-_kernel_call_inirtn(void)$NL$
-{$NL$
-$FOREACH order INI.ORDER_LIST$
-$ 	// iniatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3241ï¼½
-$	//ï¼TA_NULLã§ãªãå ´åï¼
-	$IF INI.INIATR[order] != 0$
-		$ERROR INI.TEXT_LINE[order]$E_RSATR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of %3% `%4%\' in %5%"),
-						"iniatr", INI.INIATR[order], "inirtn",
-						INI.INIRTN[order], "ATT_INI")$
-		$END$
-	$END$
-	$TAB$((INIRTN)($INI.INIRTN[order]$))((intptr_t)($INI.EXINF[order]$));$NL$
-$END$
-}$NL$
-$NL$
-
-$ 
-$  çµäºå¦çã«ã¼ãã³ã®å®è¡é¢æ°
-$ 
-/*$NL$
-$SPC$*  Termination Routine$NL$
-$SPC$*/$NL$
-$NL$
-void$NL$
-_kernel_call_terrtn(void)$NL$
-{$NL$
-$FOREACH rorder TER.RORDER_LIST$
-$ 	// teratrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3248ï¼½
-$	//ï¼TA_NULLã§ãªãå ´åï¼
-	$IF TER.TERATR[rorder] != 0$
-		$ERROR TER.TEXT_LINE[rorder]$E_RSATR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of %3% `%4%\' in %5%"),
-						"teratr", TER.TERATR[rorder], "terrtn",
-						TER.TERRTN[rorder], "ATT_TER")$
-		$END$
-	$END$
-	$TAB$((TERRTN)($TER.TERRTN[rorder]$))((intptr_t)($TER.EXINF[rorder]$));$NL$
-$END$
-}$NL$
-$NL$
-
-$
-$  kernel_cfg.hã®æ«å°¾é¨åã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#endif /* TOPPERS_KERNEL_CFG_H */$NL$
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel.trb	(revision 306)
@@ -0,0 +1,491 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: kernel.trb 670 2016-03-03 15:08:11Z ertl-hiro $
+# 
+
+#
+#		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹2ã®çæã¹ã¯ãªãã
+#
+
+#
+#  ã¿ã¤ã ã¹ã¿ã³ããã¡ã¤ã«ã®æå®
+#
+$timeStampFileName = "kernel_cfg.timestamp"
+
+#
+#  kernel_cfg.hã®å
+é ­é¨åã®çæ
+#
+$kernelCfgH = GenFile.new("kernel_cfg.h")
+$kernelCfgH.add(<<EOS)
+/* kernel_cfg.h */
+#ifndef TOPPERS_KERNEL_CFG_H
+#define TOPPERS_KERNEL_CFG_H
+EOS
+
+#
+#  kernel_cfg.cã®å
+é ­é¨åã®çæ
+#
+$kernelCfgC = GenFile.new("kernel_cfg.c")
+$kernelCfgC.add(<<EOS)
+/* kernel_cfg.c */
+#include "kernel/kernel_int.h"
+#include "kernel_cfg.h"
+
+#if !(TKERNEL_PRID == 0x0007U && (TKERNEL_PRVER & 0xf000U) == 0x3000U)
+#error The kernel does not match this configuration file.
+#endif
+EOS
+
+#
+#  ã¤ã³ã¯ã«ã¼ããã£ã¬ã¯ãã£ãï¼#includeï¼
+#
+$kernelCfgC.comment_header("Include Directives")
+$includeFiles.each do |file|
+  $kernelCfgC.add("#include #{file}")
+end
+$kernelCfgC.add()
+
+#
+#  ã¹ã¿ãã¯é åã®ç¢ºä¿é¢æ°
+#
+#  ã¹ã¿ãã¯é åã®å®ç¾©åã¨ï¼ã¹ã¿ãã¯é åã®ãµã¤ãºè¨è¿°ãé
+åã§è¿ãï¼
+#
+unless defined? AllocStack()
+  def AllocStack(stack, size)
+    # å¤§ããæ¹ã«ä¸¸ãããµã¤ãºã§ç¢ºä¿ããï¼»NGKI1050ï¼½ï¼»NGKI3220ï¼½
+    $kernelCfgC.add("static STK_T #{stack}[COUNT_STK_T(#{size})];")
+    return("ROUND_STK_T(#{size})")
+  end
+end
+
+#
+#  ã«ã¼ãã«ãªãã¸ã§ã¯ãã«é¢ããæ
+å ±ã®çæï¼ä»®æ³ã¯ã©ã¹ï¼
+#
+class KernelObject
+  def initialize(obj, object, obj_s = obj)
+    @obj = obj
+    @OBJ = obj.tr("a-z", "A-Z")
+    @object = object
+    @obj_s = obj_s
+    @OBJ_S = obj_s.tr("a-z", "A-Z")
+    @objid = (obj + "id").to_sym
+    @api = "CRE_#{@OBJ}".to_sym
+  end
+
+  def generate()
+    # kernel_cfg.hã®çæ
+    $kernelCfgH.add("#define TNUM_#{@OBJ}ID\t#{$cfgData[@api].size}")
+
+    # ãªãã¸ã§ã¯ãã®IDçªå·ã®ãã¯ã­å®ç¾©ã®çæ
+    $cfgData[@api].sort.each do |key, params|
+      $kernelCfgH.add("#define #{params[@objid]}\t#{params[@objid].val}")
+    end
+    $kernelCfgH.add()
+
+    # ãªãã¸ã§ã¯ãã®IDçªå·ãä¿æããå¤æ°
+    if $USE_EXTERNAL_ID
+      $cfgData[@api].sort.each do |key, params|
+        $kernelCfgC.add("const ID #{params[@objid]}_id" \
+										" = #{params[@objid].val};")
+      end
+      $kernelCfgC.add()
+    end
+
+    # ãªãã¸ã§ã¯ãIDçªå·ã®æå¤§å¤
+    $kernelCfgC.add2("const ID _kernel_tmax_#{@obj}id" \
+							" = (TMIN_#{@OBJ}ID + TNUM_#{@OBJ}ID - 1);")
+
+    # ãã¼ã¿æ§é 
+    if $cfgData[@api].size > 0
+      # äºåæºåï¼ã¨ã©ã¼ãã§ãã¯ï¼ã¡ã¢ãªé åã®çæï¼
+      $cfgData[@api].sort.each do |key, params|
+        prepare(key, params)
+      end
+
+      # ãªãã¸ã§ã¯ãå
+¨ä½ã«å¯¾ãã¦å¿
+è¦ãªã¡ã¢ãªé åã®çæï¼ãªãã·ã§ã³ï¼
+      if respond_to?(:generateData)
+        generateData()
+      end
+
+      # ãªãã¸ã§ã¯ãåæåãã­ãã¯ã®çæ
+      $kernelCfgC.add("const #{@OBJ_S}INIB _kernel_#{@obj_s}inib_table" \
+													"[TNUM_#{@OBJ}ID] = {")
+      $cfgData[@api].sort.each_with_index do |(key, params), index|
+        $kernelCfgC.add(",") if index > 0
+        $kernelCfgC.append("\t{ " + generateInib(key, params) + " }")
+      end
+      $kernelCfgC.add
+      $kernelCfgC.add2("};")
+
+      # ãªãã¸ã§ã¯ãç®¡çãã­ãã¯ã®çæ
+      $kernelCfgC.add2("#{@OBJ_S}CB _kernel_#{@obj_s}cb_table" \
+													"[TNUM_#{@OBJ}ID];")
+
+      # ãªãã¸ã§ã¯ãåæåé¢æ°ã®è¿½å 
+      $initializeFunctions.push("_kernel_initialize_#{@object}();")
+    else
+      # ãªãã¸ã§ã¯ãã1ã¤ããªãå ´å
+      $kernelCfgC.add("TOPPERS_EMPTY_LABEL(const #{@OBJ_S}INIB, " \
+										"_kernel_#{@obj_s}inib_table);")
+      $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(#{@OBJ_S}CB, " \
+										"_kernel_#{@obj_s}cb_table);")
+    end
+  end
+end
+
+#
+#  éç¥ãã³ãã©ã®çæé¢æ°
+#
+def generateNotifyHandler(key, params, objid)
+  # ãã©ã¡ã¼ã¿ãå¤æ°ã«æ ¼ç´
+  nfymode = params[:nfymode]
+  nfymode1 = nfymode & 0x0f
+  nfymode2 = nfymode & ~0x0f
+  par1 = params[:par1]
+  par2 = params[:par2]
+
+  # éç¥å¦çã®ãã©ã¡ã¼ã¿æ°ã«ããè£æ­£å¦ç
+  if nfymode == $TNFY_HANDLER || nfymode1 == $TNFY_SETVAR \
+								|| nfymode1 == $TNFY_SETFLG \
+								|| nfymode1 == $TNFY_SNDDTQ
+    # éç¥å¦çã®ãã©ã¡ã¼ã¿ã2ã¤ã®å ´å
+	numpar = 2
+	epar1 = params[:par3]
+	epar2 = params[:par4]
+  else
+    # éç¥å¦çã®ãã©ã¡ã¼ã¿ã1ã¤ã®å ´å
+    numpar = 1
+    epar1 = params[:par2]
+    epar2 = params[:par3]
+  end
+
+  # ãã©ã¡ã¼ã¿æ°ã®ãã§ãã¯
+  if (numpar == 2 && par2.nil?) || (nfymode2 != 0 && epar1.nil?) \
+								|| (nfymode2 == $TENFY_SETFLG && epar2.nil?)
+    # ãã©ã¡ã¼ã¿ãè¶³ããªãå ´å
+    error_api(params, "too few parameters for nfymode `#{nfymode}' " \
+											"in %apiname of %#{objid}")
+  elsif (nfymode2 == 0 && !epar1.nil?) \
+					|| (nfymode2 != $TENFY_SETFLG && !epar2.nil?)
+    # ãã©ã¡ã¼ã¿ãå¤ãããå ´å
+    error_api(params, "too many parameters for nfymode `#{nfymode}' " \
+											"in %apiname of %#{objid}")
+  elsif nfymode == $TNFY_HANDLER
+    # ã¿ã¤ã ã¤ãã³ããã³ãã©ã®å¼åºã
+    funcname = "(NFYHDR)(#{par2})"
+  else
+    # éç¥ãã³ãã©ã®é¢æ°å
+    funcname = "_kernel_nfyhdr_#{params[objid]}"
+
+    # ã¨ã©ã¼éç¥ã®ããã®å¤æ°ã®ã¢ãã¬ã¹ã¨ãªãã¸ã§ã¯ãIDãæ ¼ç´ãã
+    # å¤æ°ã®çæï¼ã¨ã©ã¼ãã§ãã¯ã®ããã«å¿
+è¦ï¼
+    if nfymode2 == $TENFY_SETVAR || nfymode2 == $TENFY_INCVAR
+      $kernelCfgC.add2("intptr_t *const #{funcname}_p_evar =" \
+											" (intptr_t *)(#{epar1});")
+    elsif nfymode2 == $TENFY_ACTTSK || nfymode2 == $TENFY_WUPTSK
+      $kernelCfgC.add2("const ID #{funcname}_etskid = #{epar1};")
+    elsif nfymode2 == $TENFY_SIGSEM
+      $kernelCfgC.add2("const ID #{funcname}_esemid = #{epar1};")
+    elsif nfymode2 == $TENFY_SETFLG
+      $kernelCfgC.add2("const ID #{funcname}_eflgid = #{epar1};")
+    elsif nfymode2 == $TENFY_SNDDTQ
+      $kernelCfgC.add2("const ID #{funcname}_edtqid = #{epar1};")
+    end
+
+    # é¢æ°ã®å
+é ­é¨åã®çæ
+    $kernelCfgC.add("static void")
+    $kernelCfgC.add("#{funcname}(intptr_t exinf)")
+    $kernelCfgC.add("{")
+
+    if nfymode2 == 0
+      # ã¨ã©ã¼éç¥ããªãå ´å
+      errorCode = "(void) "
+    else
+      # ã¨ã©ã¼éç¥ãããå ´å
+      $kernelCfgC.add2("\tER\tercd;")
+      errorCode = "ercd = "
+    end
+
+    # ã¤ãã³ãéç¥å¦çã®å¦ç
+    if nfymode1 == $TNFY_SETVAR && nfymode2 == 0
+      # å¤æ°ã®è¨­å®
+      $kernelCfgC.add("\t*((intptr_t *) exinf) = (#{par2});")
+    elsif nfymode1 == $TNFY_INCVAR && nfymode2 == 0
+      # å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã
+      $kernelCfgC.add("\t(void) loc_cpu();")
+      $kernelCfgC.add("\t*((intptr_t *) exinf) += 1;")
+      $kernelCfgC.add("\t(void) unl_cpu();")
+    elsif nfymode1 == $TNFY_ACTTSK
+      # ã¿ã¹ã¯ã®èµ·å
+      $kernelCfgC.add("\t#{errorCode}act_tsk((ID) exinf);")
+    elsif nfymode1 == $TNFY_WUPTSK
+      # ã¿ã¹ã¯ã®èµ·åº
+      $kernelCfgC.add("\t#{errorCode}wup_tsk((ID) exinf);")
+    elsif nfymode1 == $TNFY_SIGSEM
+      # ã»ããã©ã®è¿å´
+      $kernelCfgC.add("\t#{errorCode}sig_sem((ID) exinf);")
+    elsif nfymode1 == $TNFY_SETFLG
+      # ã¤ãã³ããã©ã°ã®ã»ãã
+      $kernelCfgC.add("\t#{errorCode}set_flg(((ID) exinf), #{par2});")
+    elsif nfymode1 == $TNFY_SNDDTQ
+      # ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
+      $kernelCfgC.add("\t#{errorCode}psnd_dtq(((ID) exinf), #{par2});")
+    else
+      error_illegal_id("E_PAR", params, :nfymode, objid)
+    end
+			
+    if nfymode2 != 0
+      # ã¨ã©ã¼éç¥å¦çã®å¦ç
+      $kernelCfgC.add("\tif (ercd != E_OK) {")
+
+
+      if nfymode2 == $TENFY_SETVAR
+        # å¤æ°ã®è¨­å®
+        $kernelCfgC.add("\t\t*#{funcname}_p_evar = (intptr_t) ercd;")
+      elsif nfymode2 == $TENFY_INCVAR
+        # å¤æ°ã®ã¤ã³ã¯ãªã¡ã³ã
+        $kernelCfgC.add("\t\t(void) loc_cpu();")
+        $kernelCfgC.add("\t\t*#{funcname}_p_evar += 1;")
+        $kernelCfgC.add("\t\t(void) unl_cpu();")
+      elsif nfymode2 == $TENFY_ACTTSK
+        # ã¿ã¹ã¯ã®èµ·å
+        $kernelCfgC.add("\t\t(void) act_tsk(#{funcname}_etskid);")
+      elsif nfymode2 == $TENFY_WUPTSK
+        # ã¿ã¹ã¯ã®èµ·åº
+        $kernelCfgC.add("\t\t(void) wup_tsk(#{funcname}_etskid);")
+      elsif nfymode2 == $TENFY_SIGSEM
+        # ã»ããã©ã®è¿å´
+        $kernelCfgC.add("\t\t(void) sig_sem(#{funcname}_esemid);")
+      elsif nfymode2 == $TENFY_SETFLG
+        # ã¤ãã³ããã©ã°ã®ã»ãã
+        $kernelCfgC.add("\t\t(void) set_flg(#{funcname}_eflgid, #{epar2});")
+      elsif nfymode2 == $TENFY_SNDDTQ
+        # ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡
+        $kernelCfgC.add("\t\t(void) psnd_dtq(#{funcname}_edtqid," \
+													" (intptr_t) ercd);")
+      else
+        error_illegal_id("E_PAR", params, :nfymode, objid)
+      end
+      $kernelCfgC.add("\t}")
+    end
+
+    # é¢æ°ã®æ«å°¾é¨åã®çæ
+    $kernelCfgC.add2("}")
+  end
+  return(funcname)
+end
+
+#
+#  åæ©è½ã¢ã¸ã¥ã¼ã«ã®ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³
+#
+$initializeFunctions = []
+IncludeTrb("kernel/task.trb")
+IncludeTrb("kernel/semaphore.trb")
+IncludeTrb("kernel/eventflag.trb")
+IncludeTrb("kernel/dataqueue.trb")
+IncludeTrb("kernel/pridataq.trb")
+IncludeTrb("kernel/mutex.trb")
+IncludeTrb("kernel/mempfix.trb")
+IncludeTrb("kernel/cyclic.trb")
+IncludeTrb("kernel/alarm.trb")
+IncludeTrb("kernel/overrun.trb")
+IncludeTrb("kernel/interrupt.trb")
+IncludeTrb("kernel/exception.trb")
+
+#
+#  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é å
+#
+$kernelCfgC.comment_header("Stack Area for Non-task Context")
+
+if $cfgData[:DEF_ICS].size == 0
+  # DEF_ICSããªãå ´åã®ããã©ã«ãå¤ã®è¨­å®
+  if $DEFAULT_ISTK.nil?
+    # ã¹ã¿ãã¯é åã®èªåå²ä»ã
+    istksz = AllocStack("_kernel_istack", "DEFAULT_ISTKSZ")
+    istk = "_kernel_istack"
+  else
+    istksz = "DEFAULT_ISTKSZ"
+    istk = "DEFAULT_ISTK"
+  end
+else
+  # éçAPIãDEF_ICSããè¤æ°ããï¼E_OBJï¼ï¼»NGKI3216ï¼½
+  if $cfgData[:DEF_ICS].size > 1
+    error("E_OBJ: too many DEF_ICS")
+  end
+
+  # DEF_ICSãããå ´åã®å¦ç
+  params = $cfgData[:DEF_ICS][1]
+
+  # ãã©ã¡ã¼ã¿ãçç¥ãããæã®ããã©ã«ãå¤ã®è¨­å®
+  params[:istk] ||= "NULL"
+
+  # istkszãã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_ISTKSZï¼æªå®ç¾©ã®å ´åã¯1ï¼
+  # ãããå°ããå ´åï¼E_PARï¼ï¼»NGKI3254ï¼½
+  if params[:istksz] < $TARGET_MIN_ISTKSZ
+    error_wrong("E_PAR", params, :istksz, "too small")
+  end
+
+  if params[:istk] == "NULL"
+    # ã¹ã¿ãã¯é åã®èªåå²ä»ã
+    istksz = AllocStack("_kernel_istack", params[:istksz])
+    istk = "_kernel_istack"
+  else
+    # istkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´åï¼E_PARï¼ï¼»NGKI3222ï¼½
+    if (params[:istksz] & ($CHECK_STKSZ_ALIGN - 1)) != 0
+      error_wrong("E_PAR", params, :istksz, "not aligned")
+    end
+
+    istksz = "(#{params[:istksz]})"
+    istk = "(void *)(#{params[:istk]})"
+  end
+end
+
+$kernelCfgC.add(<<EOS)
+const size_t _kernel_istksz = #{istksz};
+STK_T *const _kernel_istk = #{istk};
+
+#ifdef TOPPERS_ISTKPT
+STK_T *const _kernel_istkpt = TOPPERS_ISTKPT(#{istk}, #{istksz});
+#endif /* TOPPERS_ISTKPT */
+EOS
+
+#
+#  ã¿ã¤ã ã¤ãã³ãç®¡ç
+#
+$kernelCfgC.comment_header("Time Event Management")
+$kernelCfgC.add(<<EOS)
+TMEVTN   _kernel_tmevt_heap[1 + TNUM_TSKID + TNUM_CYCID + TNUM_ALMID];
+EOS
+
+#
+#  åã¢ã¸ã¥ã¼ã«ã®åæåé¢æ°
+#
+$kernelCfgC.comment_header("Module Initialization Function")
+$kernelCfgC.append(<<EOS)
+void
+_kernel_initialize_object(void)
+{
+EOS
+$initializeFunctions.each do |func|
+  $kernelCfgC.add("\t#{func}")
+end
+$kernelCfgC.add2("}")
+
+#
+#  åæåã«ã¼ãã³æ©è½
+#
+$kernelCfgC.comment_header("Initialization Routine")
+
+# ã¨ã©ã¼ãã§ãã¯
+$cfgData[:ATT_INI].each do |key, params|
+  # iniatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3241ï¼½
+  #ï¼TA_NULLã§ãªãå ´åï¼
+  if (params[:iniatr] != $TA_NULL)
+    error_illegal_sym("E_RSATR", params, :iniatr, :inirtn)
+  end
+end
+
+# åæåã«ã¼ãã³ã®å®è¡é¢æ°ã®çæ
+$kernelCfgC.append(<<EOS)
+void
+_kernel_call_inirtn(void)
+{
+EOS
+$cfgData[:ATT_INI].each do |key, params|
+  $kernelCfgC.add("\t((INIRTN)(#{params[:inirtn]}))" \
+								"((intptr_t)(#{params[:exinf]}));")
+end
+$kernelCfgC.add2("}")
+
+#
+#  çµäºå¦çã«ã¼ãã³æ©è½
+#
+$kernelCfgC.comment_header("Termination Routine")
+
+# ã¨ã©ã¼ãã§ãã¯
+$cfgData[:ATT_TER].each do |key, params|
+  # teratrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI3248ï¼½
+  #ï¼TA_NULLã§ãªãå ´åï¼
+  if (params[:teratr] != $TA_NULL)
+    error_illegal_sym("E_RSATR", params, :teratr, :terrtn)
+  end
+end
+
+# çµäºå¦çã«ã¼ãã³ã®å®è¡é¢æ°ã®çæ
+$kernelCfgC.append(<<EOS)
+void
+_kernel_call_terrtn(void)
+{
+EOS
+$cfgData[:ATT_TER].reverse_each do |key, params|
+  $kernelCfgC.add("\t((TERRTN)(#{params[:terrtn]}))" \
+								"((intptr_t)(#{params[:exinf]}));")
+end
+$kernelCfgC.add2("}")
+
+#
+#  kernel_cfg.hã®æ«å°¾é¨åã®çæ
+#
+$kernelCfgH.append(<<EOS)
+#endif /* TOPPERS_KERNEL_CFG_H */
+EOS
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_api.csv
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_api.csv	(revision 302)
+++ 	(revision )
@@ -1,17 +1,0 @@
-tsk,CRE_TSK,#tskid { .tskatr &exinf &task +itskpri .stksz &stk },,
-sem,CRE_SEM,#semid { .sematr .isemcnt .maxsem },,
-flg,CRE_FLG,#flgid { .flgatr .iflgptn },,
-dtq,CRE_DTQ,#dtqid { .dtqatr .dtqcnt &dtqmb },,
-pdq,CRE_PDQ,#pdqid { .pdqatr .pdqcnt +maxdpri &pdqmb },,
-mtx,CRE_MTX,#mtxid { .mtxatr +ceilpri? },,
-mpf,CRE_MPF,#mpfid { .mpfatr .blkcnt .blksz &mpf &mpfmb },,
-cyc,CRE_CYC,#cycid { .cycatr { .nfymode &par1 &par2? &par3? &par4? } .cyctim .cycphs },,
-alm,CRE_ALM,#almid { .almatr { .nfymode &par1 &par2? &par3? &par4? } },,
-ovr,DEF_OVR,{ .ovratr &ovrhdr },-1,
-int,CFG_INT,.intno { .intatr +intpri },,
-isr,CRE_ISR,#isrid { .isratr &exinf .intno &isr +isrpri },,
-inh,DEF_INH,.inhno { .inhatr &inthdr },,
-exc,DEF_EXC,.excno { .excatr &exchdr },,
-ics,DEF_ICS,{ .istksz &istk },-1,
-ini,ATT_INI,{ .iniatr &exinf &inirtn },-1,
-ter,ATT_TER,{ .teratr &exinf &terrtn },-1,
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_api.def
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_api.def	(revision 306)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_api.def	(revision 306)
@@ -0,0 +1,17 @@
+CRE_TSK #tskid* { .tskatr &exinf &task +itskpri .stksz &stk? }
+CRE_SEM #semid* { .sematr .isemcnt .maxsem }
+CRE_FLG #flgid* { .flgatr .iflgptn }
+CRE_DTQ #dtqid* { .dtqatr .dtqcnt &dtqmb? }
+CRE_PDQ #pdqid* { .pdqatr .pdqcnt +maxdpri &pdqmb? }
+CRE_MTX #mtxid* { .mtxatr +ceilpri? }
+CRE_MPF #mpfid* { .mpfatr .blkcnt .blksz &mpf? &mpfmb? }
+CRE_CYC #cycid* { .cycatr { .nfymode &par1 &par2? &par3? &par4? } .cyctim .cycphs }
+DEF_OVR { .ovratr &ovrhdr }
+CRE_ALM #almid* { .almatr { .nfymode &par1 &par2? &par3? &par4? } }
+CFG_INT .intno* { .intatr +intpri }
+CRE_ISR #isrid* { .isratr &exinf .intno &isr +isrpri }
+DEF_INH .inhno* { .inhatr &inthdr }
+DEF_EXC .excno* { .excatr &exchdr }
+DEF_ICS { .istksz &istk? }
+ATT_INI { .iniatr &exinf &inirtn }
+ATT_TER { .teratr &exinf &terrtn }
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_check.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_check.tf	(revision 302)
+++ 	(revision )
@@ -1,406 +1,0 @@
-$ 
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2008-2015 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$  
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$  
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: kernel_check.tf 463 2015-10-18 14:25:55Z ertl-hiro $
-$  
-
-$
-$		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹3ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  ãã¼ã¿ã»ã¯ã·ã§ã³ã®LMAããVMAã¸ã®ã³ãã¼
-$
-$FOREACH lma LMA.ORDER_LIST$
-	$start_data = SYMBOL(LMA.START_DATA[lma])$
-	$end_data = SYMBOL(LMA.END_DATA[lma])$
-	$start_idata = SYMBOL(LMA.START_IDATA[lma])$
-	$IF !LENGTH(start_data)$
-		$ERROR$$FORMAT(_("symbol '%1%' not found"), LMA.START_DATA[lma])$$END$
-	$ELIF !LENGTH(end_data)$
-		$ERROR$$FORMAT(_("symbol '%1%' not found"), LMA.END_DATA[lma])$$END$
-	$ELIF !LENGTH(start_idata)$
-		$ERROR$$FORMAT(_("symbol '%1%' not found"), LMA.START_IDATA[lma])$$END$
-	$ELSE$
-		$BCOPY(start_idata, start_data, end_data - start_data)$
-	$END$
-$END$
-
-$
-$  éç¥æ
-å ±ã®ãã§ãã¯é¢æ°
-$
-$tmax_tskid = PEEK(SYMBOL("_kernel_tmax_tskid"), sizeof_ID)$
-$tmax_semid = PEEK(SYMBOL("_kernel_tmax_semid"), sizeof_ID)$
-$tmax_flgid = PEEK(SYMBOL("_kernel_tmax_flgid"), sizeof_ID)$
-$tmax_dtqid = PEEK(SYMBOL("_kernel_tmax_dtqid"), sizeof_ID)$
-
-$FUNCTION CHECK_NFYHDR$
-$	// ãã©ã¡ã¼ã¿ãå¤æ°ã«æ ¼ç´
-	$nfymode = ARGV[1]$
-	$nfymode1 = nfymode & 0x0f$
-	$nfymode2 = nfymode & ~0x0f$
-	$exinf = ARGV[2]$
-	$nfyhdr = ARGV[3]$
-	$par1 = ARGV[4]$
-	$par2 = ARGV[5]$
-	$text_line = ARGV[8]$
-	$objid = ARGV[9]$
-	$apiname = ARGV[10]$
-	$funcname = CONCAT("_kernel_nfyhdr_", objid)$
-
-$	// éç¥å¦çã®ãã©ã¡ã¼ã¿æ°ã«ããè£æ­£å¦ç
-	$IF nfymode1 == TNFY_SETVAR || nfymode1 == TNFY_SETFLG
-											|| nfymode1 == TNFY_SNDDTQ$
-$		// éç¥å¦çã®ãã©ã¡ã¼ã¿ã2ã¤ã®å ´å
-		$epar1 = ARGV[6]$
-		$epar2 = ARGV[7]$
-	$ELSE$
-$		// éç¥å¦çã®ãã©ã¡ã¼ã¿ã1ã¤ã®å ´å
-		$epar1 = ARGV[5]$
-		$epar2 = ARGV[6]$
-	$END$
-
-$	// ã¿ã¤ã ã¤ãã³ããã³ãã©ã®å
-é ­çªå°ã®ãã§ãã¯ï¼»NGKI3693ï¼½
-	$IF nfymode == TNFY_HANDLER$
-		$tmehdr = nfyhdr$
-		$IF CHECK_FUNC_ALIGN && (tmehdr & (CHECK_FUNC_ALIGN - 1)) != 0$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-										"tmehdr", par2, objid, apiname)$
-				$END$
-		$END$
-		$IF CHECK_FUNC_NONNULL && tmehdr == 0$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is null"),
-										"tmehdr", par2, objid, apiname)$
-			$END$
-		$END$
-	$END$
-
-$	// ã¤ãã³ãéç¥å¦çã®å¤æ°ã®çªå°ã¨ãªãã¸ã§ã¯ãIDã®ãã§ãã¯
-	$IF nfymode1 == TNFY_SETVAR || nfymode1 == TNFY_INCVAR$
-$		// å¤æ°ã®è¨­å®ï¼ã¤ã³ã¯ãªã¡ã³ãã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
-		$p_var = exinf$
-
-$		// å¤æ°ã®çªå°ã®ãã§ãã¯ï¼»NGKI3699ï¼½ï¼»NGKI3897ï¼½
-		$IF CHECK_INTPTR_ALIGN && (p_var & (CHECK_INTPTR_ALIGN - 1)) != 0$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-										"p_var", par1, objid, apiname)$
-			$END$
-		$END$
-		$IF CHECK_INTPTR_NONNULL && p_var == 0$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is null"),
-										"p_var", par1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode1 == TNFY_ACTTSK || nfymode1 == TNFY_WUPTSK$
-$		// ã¿ã¹ã¯ã®èµ·åï¼èµ·åºã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
-		$tskid = exinf$
-
-$		// ã¿ã¹ã¯IDã®ãã§ãã¯ï¼»NGKI3704ï¼½
-		$IF !(TMIN_TSKID <= tskid && tskid <= tmax_tskid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"tskid", par1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode1 == TNFY_SIGSEM$
-$		// ã»ããã©ã®è³æºã®è¿å´ã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
-		$semid = exinf$
-
-$		// ã»ããã©IDã®ãã§ãã¯ï¼»NGKI3707ï¼½
-		$IF !(TMIN_SEMID <= semid && semid <= tmax_semid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"semid", par1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode1 == TNFY_SETFLG$
-$		// ã¤ãã³ããã©ã°ã®ã»ããã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
-		$flgid = exinf$
-
-$		// ã¤ãã³ããã©ã°IDã®ãã§ãã¯ï¼»NGKI3710ï¼½
-		$IF !(TMIN_FLGID <= flgid && flgid <= tmax_flgid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"flgid", par1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode1 == TNFY_SNDDTQ$
-$		// ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
-		$dtqid = exinf$
-
-$		// ãã¼ã¿ã­ã¥ã¼IDã®ãã§ãã¯ï¼»NGKI3713ï¼½
-		$IF !(TMIN_DTQID <= dtqid && dtqid <= tmax_dtqid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"dtqid", par1, objid, apiname)$
-			$END$
-		$END$
-	$END$
-
-$	// ã¨ã©ã¼éç¥å¦çã®å¤æ°ã®çªå°ã¨ãªãã¸ã§ã¯ãIDã®ãã§ãã¯
-	$IF nfymode2 == TENFY_SETVAR || nfymode2 == TENFY_INCVAR$
-$		// å¤æ°ã®è¨­å®ï¼ã¤ã³ã¯ãªã¡ã³ãã«ããã¨ã©ã¼ã®éç¥
-		$p_var = PEEK(SYMBOL(CONCAT(funcname, "_p_evar")), sizeof_intptr_t)$
-
-$		// å¤æ°ã®çªå°ã®ãã§ãã¯ï¼»NGKI3701ï¼½ï¼»NGKI3897ï¼½
-		$IF CHECK_INTPTR_ALIGN && (p_var & (CHECK_INTPTR_ALIGN - 1)) != 0$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-										"p_var", epar1, objid, apiname)$
-			$END$
-		$END$
-		$IF CHECK_INTPTR_NONNULL && p_var == 0$
-			$ERROR text_line$E_PAR:$SPC$
-				$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is null"),
-										"p_var", epar1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode2 == TENFY_ACTTSK || nfymode2 == TENFY_WUPTSK$
-$		// ã¿ã¹ã¯ã®èµ·åï¼èµ·åºã«ããã¨ã©ã¼ã®éç¥
-		$tskid = PEEK(SYMBOL(CONCAT(funcname, "_etskid")), sizeof_ID)$
-
-$		// ã¿ã¹ã¯IDã®ãã§ãã¯ï¼»NGKI3704ï¼½
-		$IF !(TMIN_TSKID <= tskid && tskid <= tmax_tskid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"tskid", epar1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode2 == TENFY_SIGSEM$
-$		// ã»ããã©ã®è³æºã®è¿å´ã«ããã¨ã©ã¼ã®éç¥
-		$semid = PEEK(SYMBOL(CONCAT(funcname, "_esemid")), sizeof_ID)$
-
-$		// ã»ããã©IDã®ãã§ãã¯ï¼»NGKI3707ï¼½
-		$IF !(TMIN_SEMID <= semid && semid <= tmax_semid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"semid", epar1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode2 == TENFY_SETFLG$
-$		// ã¤ãã³ããã©ã°ã®ã»ããã«ããã¨ã©ã¼ã®éç¥
-		$flgid = PEEK(SYMBOL(CONCAT(funcname, "_eflgid")), sizeof_ID)$
-
-$		// ã¤ãã³ããã©ã°IDã®ãã§ãã¯ï¼»NGKI3710ï¼½
-		$IF !(TMIN_FLGID <= flgid && flgid <= tmax_flgid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"flgid", epar1, objid, apiname)$
-			$END$
-		$END$
-	$ELIF nfymode2 == TENFY_SNDDTQ$
-$		// ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããã¨ã©ã¼ã®éç¥
-		$dtqid = PEEK(SYMBOL(CONCAT(funcname, "_edtqid")), sizeof_ID)$
-
-$		// ãã¼ã¿ã­ã¥ã¼IDã®ãã§ãã¯ï¼»NGKI3715ï¼½
-		$IF !(TMIN_DTQID <= dtqid && dtqid <= tmax_dtqid)$
-			$ERROR text_line$E_ID:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-										"dtqid", epar1, objid, apiname)$
-			$END$
-		$END$
-	$END$
-$END$
-
-$ 
-$  ã¿ã¹ã¯ã«é¢ãããã§ãã¯
-$ 
-$tinib = SYMBOL("_kernel_tinib_table")$
-$FOREACH tskid TSK.ID_LIST$
-$	// ã¿ã¹ã¯ã®å
-é ­çªå°ã®ãã§ãã¯ï¼»NGKI1033ï¼½
-	$task = PEEK(tinib + offsetof_TINIB_task, sizeof_FP)$
-	$IF CHECK_FUNC_ALIGN && (task & (CHECK_FUNC_ALIGN - 1)) != 0$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-							"task", TSK.TASK[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-	$IF CHECK_FUNC_NONNULL && task == 0$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is null"),
-							"task", TSK.TASK[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-
-$	// ã¿ã¹ã¯ã®ã¹ã¿ãã¯é åã®å
-é ­çªå°ã®ãã§ãã¯ï¼»NGKI1056ï¼½
-	$IF USE_TSKINICTXB$
-		$stk = GET_STK_TSKINICTXB(tinib)$
-	$ELSE$
-		$stk = PEEK(tinib + offsetof_TINIB_stk, sizeof_void_ptr)$
-	$END$
-	$IF CHECK_STACK_ALIGN && (stk & (CHECK_STACK_ALIGN - 1)) != 0$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-							"stk", TSK.STK[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-	$IF CHECK_STACK_NONNULL && stk == 0$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is null"),
-							"stk", TSK.STK[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-
-	$tinib = tinib + sizeof_TINIB$
-$END$
-
-$ 
-$  å¨æéç¥ã«é¢ãããã§ãã¯
-$ 
-$cycinib = SYMBOL("_kernel_cycinib_table")$
-$FOREACH cycid CYC.ID_LIST$
-	$exinf = PEEK(cycinib + offsetof_CYCINIB_exinf, sizeof_intptr_t)$
-	$nfyhdr = PEEK(cycinib + offsetof_CYCINIB_nfyhdr, sizeof_FP)$
-
-$	// éç¥æ
-å ±ã®ãã§ãã¯
-	$CHECK_NFYHDR(CYC.NFYMODE[cycid], exinf, nfyhdr,
-						CYC.PAR1[cycid], CYC.PAR2[cycid],
-						CYC.PAR3[cycid], CYC.PAR4[cycid],
-						CYC.TEXT_LINE[cycid], cycid, "CRE_CYC")$
-
-	$cycinib = cycinib + sizeof_CYCINIB$
-$END$
-
-$ 
-$  ã¢ã©ã¼ã éç¥ã«é¢ãããã§ãã¯
-$ 
-$alminib = SYMBOL("_kernel_alminib_table")$
-$FOREACH almid ALM.ID_LIST$
-	$exinf = PEEK(alminib + offsetof_ALMINIB_exinf, sizeof_intptr_t)$
-	$nfyhdr = PEEK(alminib + offsetof_ALMINIB_nfyhdr, sizeof_FP)$
-
-$	// éç¥æ
-å ±ã®ãã§ãã¯
-	$CHECK_NFYHDR(ALM.NFYMODE[almid], exinf, nfyhdr,
-						ALM.PAR1[almid], ALM.PAR2[almid],
-						ALM.PAR3[almid], ALM.PAR4[almid],
-						ALM.TEXT_LINE[almid], almid, "CRE_ALM")$
-
-	$alminib = alminib + sizeof_ALMINIB$
-$END$
-
-$
-$  ãªã¼ãã©ã³ãã³ãã©ã«é¢ãããã§ãã¯
-$
-$ovrinib = SYMBOL("_kernel_ovrinib")$
-$IF LENGTH(OVR.ORDER_LIST)$
-	$ovrhdr = PEEK(ovrinib + offsetof_OVRINIB_ovrhdr, sizeof_FP)$
-
-$	// ãªã¼ãã©ã³ãã³ãã©ã®å
-é ­çªå°ã®ãã§ãã¯ï¼»NGKI2613ï¼½
-	$IF CHECK_FUNC_ALIGN && (ovrhdr & (CHECK_FUNC_ALIGN - 1)) != 0$
-		$ERROR OVR.TEXT_LINE[1]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' in %4% is not aligned"),
-							"ovrhdr", OVR.OVRHDR[1], "DEF_OVR")$
-		$END$
-	$END$
-	$IF CHECK_FUNC_NONNULL && ovrhdr == 0$
-		$ERROR OVR.TEXT_LINE[1]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' in %3% is null"),
-							"ovrhdr", OVR.OVRHDR[1], "DEF_OVR")$
-		$END$
-	$END$
-$END$
-
-$ 
-$  åºå®é·ã¡ã¢ãªãã¼ã«ã«é¢ãããã§ãã¯
-$ 
-$mpfinib = SYMBOL("_kernel_mpfinib_table")$
-$FOREACH mpfid MPF.ID_LIST$
-	$mpf = PEEK(mpfinib + offsetof_MPFINIB_mpf, sizeof_void_ptr)$
-
-$	// åºå®é·ã¡ã¢ãªãã¼ã«é åã®å
-é ­çªå°ã®ãã§ãã¯ï¼»NGKI2249ï¼½
-	$IF CHECK_MPF_ALIGN && (mpf & (CHECK_MPF_ALIGN - 1)) != 0$
-		$ERROR MPF.TEXT_LINE[mpfid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-							"mpf", MPF.MPF[mpfid], mpfid, "CRE_MPF")$
-		$END$
-	$END$
-	$IF CHECK_MPF_NONNULL && mpf == 0$
-		$ERROR MPF.TEXT_LINE[mpfid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is null"),
-							"mpf", MPF.MPF[mpfid], mpfid, "CRE_MPF")$
-		$END$
-	$END$
-
-	$mpfinib = mpfinib + sizeof_MPFINIB$
-$END$
-
-$ 
-$  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åã«é¢ãããã§ãã¯
-$ 
-$istk = PEEK(SYMBOL("_kernel_istk"), sizeof_void_ptr)$
-
-$ éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åã®å
-é ­çªå°ã®ãã§ãã¯ï¼»NGKI3222ï¼½
-$IF CHECK_STACK_ALIGN && (istk & (CHECK_STACK_ALIGN - 1)) != 0$
-	$ERROR ICS.TEXT_LINE[1]$E_PAR:$SPC$
-		$FORMAT(_("%1% `%2%\' in %3% is not aligned"),
-							"istk", ICS.ISTK[1], "DEF_ICS")$
-	$END$
-$END$
-$IF CHECK_STACK_NONNULL && istk == 0$
-	$ERROR ICS.TEXT_LINE[1]$E_PAR:$SPC$
-		$FORMAT(_("%1% `%2%\' in %3% is null"),
-							"istk", ICS.ISTK[1], "DEF_ICS")$
-	$END$
-$END$
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_check.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_check.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_check.trb	(revision 306)
@@ -0,0 +1,358 @@
+# -*- coding: utf-8 -*-
+# 
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+#  
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: kernel_check.trb 662 2016-02-27 02:33:51Z ertl-hiro $
+#  
+
+#
+#		ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã®ãã¹3ã®çæã¹ã¯ãªãã
+#
+
+# 
+#  ã¿ã¤ã ã¹ã¿ã³ããã¡ã¤ã«ã®æå®
+# 
+$timeStampFileName = "check.timestamp"
+
+#
+#  ãã¼ã¿ã»ã¯ã·ã§ã³ã®LMAããVMAã¸ã®ã³ãã¼
+#
+if !$lmaList.nil?
+  $lmaList.each do |lma|
+    startData = SYMBOL(lma[:START_DATA])
+    endData = SYMBOL(lma[:END_DATA])
+    startIdata = SYMBOL(lma[:START_IDATA])
+    if startData.nil?
+      error_exit("symbol `lma[:START_DATA]' not found")
+    elsif endData.nil?
+      error_exit("symbol `lma[:END_DATA]' not found")
+    elsif startIdata.nil?
+      error_exit("symbol `lma[:START_IDATA]' not found")
+    else
+      BCOPY(startIdata, startData, endData - startData)
+    end
+  end
+end
+
+#
+#  éç¥æ
+å ±ã®ãã§ãã¯é¢æ°
+#
+$tmax_tskid = $TMIN_TSKID + $cfgData[:CRE_TSK].size - 1
+$tmax_semid = $TMIN_SEMID + $cfgData[:CRE_SEM].size - 1
+$tmax_flgid = $TMIN_FLGID + $cfgData[:CRE_FLG].size - 1
+$tmax_dtqid = $TMIN_DTQID + $cfgData[:CRE_DTQ].size - 1
+
+def checkNotifyHandler(key, params, objid, exinf, nfyhdr)
+  # ãã©ã¡ã¼ã¿ãå¤æ°ã«æ ¼ç´
+  nfymode = params[:nfymode]
+  nfymode1 = nfymode & 0x0f
+  nfymode2 = nfymode & ~0x0f
+  par1 = params[:par1]
+  par2 = params[:par2]
+  funcname = "_kernel_nfyhdr_#{params[objid]}"
+
+  # éç¥å¦çã®ãã©ã¡ã¼ã¿æ°ã«ããè£æ­£å¦ç
+  if nfymode1 == $TNFY_SETVAR || nfymode1 == $TNFY_SETFLG \
+								|| nfymode1 == $TNFY_SNDDTQ
+    # éç¥å¦çã®ãã©ã¡ã¼ã¿ã2ã¤ã®å ´å
+    epar1 = params[:par3]
+    epar2 = params[:par4]
+  else
+    # éç¥å¦çã®ãã©ã¡ã¼ã¿ã1ã¤ã®å ´å
+    epar1 = params[:par2]
+    epar2 = params[:par3]
+  end
+
+  #	ã¿ã¤ã ã¤ãã³ããã³ãã©ã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI3693ï¼½
+  if nfymode == $TNFY_HANDLER
+    tmehdr = nfyhdr
+    params1 = params.dup
+    params1[:tmehdr] = par2
+    if (tmehdr & ($CHECK_FUNC_ALIGN - 1)) != 0
+      error_wrong_id("E_PAR", params1, :tmehdr, objid, "not aligned")
+    end
+    if $CHECK_FUNC_NONNULL && tmehdr == 0
+      error_wrong_id("E_PAR", params1, :tmehdr, objid, "null")
+    end
+  end
+
+  #	ã¤ãã³ãéç¥å¦çã®å¤æ°ã®çªå°ã¨ãªãã¸ã§ã¯ãIDã®ãã§ãã¯
+  if nfymode1 == $TNFY_SETVAR || nfymode1 == $TNFY_INCVAR
+    # å¤æ°ã®è¨­å®ï¼ã¤ã³ã¯ãªã¡ã³ãã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
+	p_var = exinf
+    params1 = params.dup
+    params1[:p_var] = par1
+
+    # å¤æ°ã®çªå°ã®ãã§ãã¯ï¼»NGKI3699ï¼½ï¼»NGKI3897ï¼½
+    if (p_var & ($CHECK_INTPTR_ALIGN - 1)) != 0
+      error_wrong_id("E_PAR", params1, :p_var, objid, "not aligned")
+    end
+    if $CHECK_INTPTR_NONNULL && p_var == 0
+      error_wrong_id("E_PAR", params1, :p_var, objid, "null")
+    end
+  elsif (nfymode1 == $TNFY_ACTTSK || nfymode1 == $TNFY_WUPTSK)
+    # ã¿ã¹ã¯ã®èµ·åï¼èµ·åºã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
+    tskid = exinf
+    params1 = params.dup
+    params1[:tskid] = par1
+
+    # ã¿ã¹ã¯IDã®ãã§ãã¯ï¼»NGKI3704ï¼½
+    if !($TMIN_TSKID <= tskid && tskid <= $tmax_tskid)
+      error_illegal_id("E_ID", params1, :tskid, objid)
+    end
+  elsif nfymode1 == $TNFY_SIGSEM
+    # ã»ããã©ã®è³æºã®è¿å´ã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
+    semid = exinf
+    params1 = params.dup
+    params1[:semid] = par1
+
+    # ã»ããã©IDã®ãã§ãã¯ï¼»NGKI3707ï¼½
+    if !($TMIN_SEMID <= semid && semid <= $tmax_semid)
+      error_illegal_id("E_ID", params1, :semid, objid)
+    end
+  elsif nfymode1 == $TNFY_SETFLG
+    # ã¤ãã³ããã©ã°ã®ã»ããã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
+    flgid = exinf
+    params1 = params.dup
+    params1[:flgid] = par1
+
+    # ã¤ãã³ããã©ã°IDã®ãã§ãã¯ï¼»NGKI3710ï¼½
+    if !($TMIN_FLGID <= flgid && flgid <= $tmax_flgid)
+      error_illegal_id("E_ID", params1, :flgid, objid)
+    end
+  elsif nfymode1 == $TNFY_SNDDTQ
+    # ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããã¿ã¤ã ã¤ãã³ãã®éç¥
+    dtqid = exinf
+    params1 = params.dup
+    params1[:dtqid] = par1
+
+    # ãã¼ã¿ã­ã¥ã¼IDã®ãã§ãã¯ï¼»NGKI3713ï¼½
+    if !($TMIN_DTQID <= dtqid && dtqid <= $tmax_dtqid)
+      error_illegal_id("E_ID", params1, :dtqid, objid)
+    end
+  end
+
+  # ã¨ã©ã¼éç¥å¦çã®å¤æ°ã®çªå°ã¨ãªãã¸ã§ã¯ãIDã®ãã§ãã¯
+  if (nfymode2 == $TENFY_SETVAR || nfymode2 == $TENFY_INCVAR)
+    # å¤æ°ã®è¨­å®ï¼ã¤ã³ã¯ãªã¡ã³ãã«ããã¨ã©ã¼ã®éç¥
+    p_var = PEEK(SYMBOL(funcname + "_p_evar"), $sizeof_intptr_t)
+    params1 = params.dup
+    params1[:p_var] = epar1
+
+    # å¤æ°ã®çªå°ã®ãã§ãã¯ï¼»NGKI3701ï¼½ï¼»NGKI3897ï¼½
+    if (p_var & ($CHECK_INTPTR_ALIGN - 1)) != 0
+      error_wrong_id("E_PAR", params1, :p_var, objid, "not aligned")
+    end
+    if $CHECK_INTPTR_NONNULL && p_var == 0
+      error_wrong_id("E_PAR", params1, :p_var, objid, "null")
+    end
+  elsif nfymode2 == $TENFY_ACTTSK || nfymode2 == $TENFY_WUPTSK
+    # ã¿ã¹ã¯ã®èµ·åï¼èµ·åºã«ããã¨ã©ã¼ã®éç¥
+    tskid = PEEK(SYMBOL(funcname + "_etskid"), $sizeof_ID)
+    params1 = params.dup
+    params1[:tskid] = epar1
+
+    # ã¿ã¹ã¯IDã®ãã§ãã¯ï¼»NGKI3704ï¼½
+    if !($TMIN_TSKID <= tskid && tskid <= $tmax_tskid)
+      error_illegal_id("E_ID", params1, :tskid, objid)
+    end
+  elsif nfymode2 == $TENFY_SIGSEM
+    # ã»ããã©ã®è³æºã®è¿å´ã«ããã¨ã©ã¼ã®éç¥
+	semid = PEEK(SYMBOL(funcname + "_esemid"), $sizeof_ID)
+    params1 = params.dup
+    params1[:semid] = epar1
+
+    # ã»ããã©IDã®ãã§ãã¯ï¼»NGKI3707ï¼½
+    if !($TMIN_SEMID <= semid && semid <= $tmax_semid)
+      error_illegal_id("E_ID", params1, :semid, objid)
+    end
+  elsif nfymode2 == $TENFY_SETFLG
+    # ã¤ãã³ããã©ã°ã®ã»ããã«ããã¨ã©ã¼ã®éç¥
+    flgid = PEEK(SYMBOL(funcname + "_eflgid"), $sizeof_ID)
+    params1 = params.dup
+    params1[:flgid] = epar1
+
+    # ã¤ãã³ããã©ã°IDã®ãã§ãã¯ï¼»NGKI3710ï¼½
+    if !($TMIN_FLGID <= flgid && flgid <= $tmax_flgid)
+      error_illegal_id("E_ID", params1, :flgid, objid)
+    end
+  elsif nfymode2 == $TENFY_SNDDTQ
+    # ãã¼ã¿ã­ã¥ã¼ã¸ã®éä¿¡ã«ããã¨ã©ã¼ã®éç¥
+    dtqid = PEEK(SYMBOL(funcname + "_edtqid"), $sizeof_ID)
+    params1 = params.dup
+    params1[:dtqid] = epar1
+
+    # ãã¼ã¿ã­ã¥ã¼IDã®ãã§ãã¯ï¼»NGKI3715ï¼½
+    if !($TMIN_DTQID <= dtqid && dtqid <= $tmax_dtqid)
+      error_illegal_id("E_ID", params1, :dtqid, objid)
+    end
+  end
+end
+
+# 
+#  ã¿ã¹ã¯ã«é¢ãããã§ãã¯
+# 
+tinib = SYMBOL("_kernel_tinib_table")
+$cfgData[:CRE_TSK].sort.each do |key, params|
+  task = PEEK(tinib + $offsetof_TINIB_task, $sizeof_TASK)
+
+  # ã¿ã¹ã¯ã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI1033ï¼½
+  if (task & ($CHECK_FUNC_ALIGN - 1)) != 0
+    error_wrong_id("E_PAR", params, :task, :tskid, "not aligned")
+  end
+  if $CHECK_FUNC_NONNULL && task == 0
+    error_wrong_id("E_PAR", params, :task, :tskid, "null")
+  end
+
+  # ã¿ã¹ã¯ã®ã¹ã¿ãã¯é åã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI1056ï¼½
+  if $USE_TSKINICTXB
+    stk = GetStackTskinictxb(key, params, tinib)
+  else
+    stk = PEEK(tinib + $offsetof_TINIB_stk, $sizeof_void_ptr)
+  end
+  if (stk & ($CHECK_STACK_ALIGN - 1)) != 0
+    error_wrong_id("E_PAR", params, :stk, :tskid, "not aligned")
+  end
+  if $CHECK_STACK_NONNULL && stk == 0
+    error_wrong_id("E_PAR", params, :stk, :tskid, "null")
+  end
+
+  tinib += $sizeof_TINIB
+end
+
+# 
+#  åºå®é·ã¡ã¢ãªãã¼ã«ã«é¢ãããã§ãã¯
+# 
+mpfinib = SYMBOL("_kernel_mpfinib_table")
+$cfgData[:CRE_MPF].sort.each do |key, params|
+  mpf = PEEK(mpfinib + $offsetof_MPFINIB_mpf, $sizeof_void_ptr)
+
+  # åºå®é·ã¡ã¢ãªãã¼ã«é åã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI2249ï¼½
+  if (mpf & ($CHECK_MPF_ALIGN - 1)) != 0
+    error_wrong_id("E_PAR", params, :mpf, :mpfid, "not aligned")
+  end
+  if $CHECK_MPF_NONNULL && mpf == 0
+    error_wrong_id("E_PAR", params, :mpf, :mpfid, "null")
+  end
+
+  mpfinib += $sizeof_MPFINIB
+end
+
+# 
+#  å¨æéç¥ã«é¢ãããã§ãã¯
+# 
+cycinib = SYMBOL("_kernel_cycinib_table")
+$cfgData[:CRE_CYC].sort.each do |key, params|
+  exinf = PEEK(cycinib + $offsetof_CYCINIB_exinf, $sizeof_intptr_t)
+  nfyhdr = PEEK(cycinib + $offsetof_CYCINIB_nfyhdr, $sizeof_NFYHDR)
+
+  #	éç¥æ
+å ±ã®ãã§ãã¯
+  checkNotifyHandler(key, params, :cycid, exinf, nfyhdr)
+
+  cycinib += $sizeof_CYCINIB
+end
+
+# 
+#  ã¢ã©ã¼ã éç¥ã«é¢ãããã§ãã¯
+# 
+alminib = SYMBOL("_kernel_alminib_table")
+$cfgData[:CRE_ALM].sort.each do |key, params|
+  exinf = PEEK(alminib + $offsetof_ALMINIB_exinf, $sizeof_intptr_t)
+  nfyhdr = PEEK(alminib + $offsetof_ALMINIB_nfyhdr, $sizeof_NFYHDR)
+
+  #	éç¥æ
+å ±ã®ãã§ãã¯
+  checkNotifyHandler(key, params, :almid, exinf, nfyhdr)
+
+  alminib += $sizeof_ALMINIB
+end
+
+#
+#  ãªã¼ãã©ã³ãã³ãã©ã«é¢ãããã§ãã¯
+#
+ovrinib = SYMBOL("_kernel_ovrinib")
+if $cfgData[:DEF_OVR].size > 0
+  ovrhdr = PEEK(ovrinib + $offsetof_OVRINIB_ovrhdr, $sizeof_OVRHDR)
+
+  # ãªã¼ãã©ã³ãã³ãã©ã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI2613ï¼½
+  if (ovrhdr & ($CHECK_FUNC_ALIGN - 1)) != 0
+    error_wrong("E_PAR", $cfgData[:DEF_OVR][1], :ovrhdr, "not aligned")
+  end
+  if $CHECK_FUNC_NONNULL && ovrhdr == 0
+    error_wrong("E_PAR", $cfgData[:DEF_OVR][1], :ovrhdr, "null")
+  end
+end
+
+# 
+#  éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åã«é¢ãããã§ãã¯
+# 
+istkAddr = SYMBOL("_kernel_istk")
+if !istkAddr.nil?
+  istk = PEEK(istkAddr, $sizeof_void_ptr)
+
+  # éã¿ã¹ã¯ã³ã³ãã­ã¹ãç¨ã®ã¹ã¿ãã¯é åã®å
+é ­çªå°ã®ãã§ãã¯ï¼»NGKI3222ï¼½
+  if (istk & ($CHECK_STACK_ALIGN - 1)) != 0
+    error_wrong("E_PAR", $cfgData[:DEF_ICS][1], :istk, "not aligned")
+  end
+  if $CHECK_STACK_NONNULL && istk == 0
+    error_wrong("E_PAR", $cfgData[:DEF_ICS][1], :istk, "null")
+  end
+end
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_def.csv
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_def.csv	(revision 302)
+++ 	(revision )
@@ -1,137 +1,0 @@
-TOPPERS_SUPPORT_OVRHDR,#defined(TOPPERS_SUPPORT_OVRHDR)
-SIL_ENDIAN_BIG,#defined(SIL_ENDIAN_BIG)
-SIL_ENDIAN_LITTLE,#defined(SIL_ENDIAN_LITTLE)
-TA_NULL,TA_NULL
-TA_ACT,TA_ACT
-TA_NOACTQUE,TA_NOACTQUE
-TA_TPRI,TA_TPRI
-TA_WMUL,TA_WMUL
-TA_CLR,TA_CLR
-TA_CEILING,TA_CEILING
-TA_STA,TA_STA
-TA_NONKERNEL,TA_NONKERNEL
-TA_ENAINT,TA_ENAINT
-TA_EDGE,TA_EDGE
-TNFY_HANDLER,TNFY_HANDLER
-TNFY_SETVAR,TNFY_SETVAR
-TNFY_INCVAR,TNFY_INCVAR
-TNFY_ACTTSK,TNFY_ACTTSK
-TNFY_WUPTSK,TNFY_WUPTSK
-TNFY_SIGSEM,TNFY_SIGSEM
-TNFY_SETFLG,TNFY_SETFLG
-TNFY_SNDDTQ,TNFY_SNDDTQ
-TENFY_SETVAR,TENFY_SETVAR
-TENFY_INCVAR,TENFY_INCVAR
-TENFY_ACTTSK,TENFY_ACTTSK
-TENFY_WUPTSK,TENFY_WUPTSK
-TENFY_SIGSEM,TENFY_SIGSEM
-TENFY_SETFLG,TENFY_SETFLG
-TENFY_SNDDTQ,TENFY_SNDDTQ
-TMIN_TPRI,TMIN_TPRI,signed
-TMAX_TPRI,TMAX_TPRI,signed
-TMIN_DPRI,TMIN_DPRI,signed
-TMAX_DPRI,TMAX_DPRI,signed
-TMIN_ISRPRI,TMIN_ISRPRI,signed
-TMAX_ISRPRI,TMAX_ISRPRI,signed
-TBIT_FLGPTN,TBIT_FLGPTN
-TMAX_MAXSEM,TMAX_MAXSEM
-TMAX_RELTIM,TMAX_RELTIM
-TMIN_INTPRI,TMIN_INTPRI,signed
-TMAX_INTPRI,TMAX_INTPRI,signed
-TMIN_TSKID,TMIN_TSKID,signed
-TMIN_SEMID,TMIN_SEMID,signed
-TMIN_FLGID,TMIN_FLGID,signed
-TMIN_DTQID,TMIN_DTQID,signed
-TMIN_PDQID,TMIN_PDQID,signed
-TMIN_MTXID,TMIN_MTXID,signed
-TMIN_MPFID,TMIN_MPFID,signed
-TMIN_CYCID,TMIN_CYCID,signed
-TMIN_ALMID,TMIN_ALMID,signed
-OMIT_INITIALIZE_INTERRUPT,#defined(OMIT_INITIALIZE_INTERRUPT)
-USE_INHINIB_TABLE,#defined(USE_INHINIB_TABLE)
-USE_INTINIB_TABLE,#defined(USE_INTINIB_TABLE)
-OMIT_INITIALIZE_EXCEPTION,#defined(OMIT_INITIALIZE_EXCEPTION)
-USE_TSKINICTXB,#defined(USE_TSKINICTXB)
-TARGET_TSKATR,#defined(TARGET_TSKATR),,TARGET_TSKATR
-TARGET_INTATR,#defined(TARGET_INTATR),,TARGET_INTATR
-TARGET_INHATR,#defined(TARGET_INHATR),,TARGET_INHATR
-TARGET_ISRATR,#defined(TARGET_ISRATR),,TARGET_ISRATR
-TARGET_EXCATR,#defined(TARGET_EXCATR),,TARGET_EXCATR
-TARGET_MIN_STKSZ,#defined(TARGET_MIN_STKSZ),,TARGET_MIN_STKSZ
-TARGET_MIN_ISTKSZ,#defined(TARGET_MIN_ISTKSZ),,TARGET_MIN_ISTKSZ
-CHECK_STKSZ_ALIGN,#defined(CHECK_STKSZ_ALIGN),,CHECK_STKSZ_ALIGN
-CHECK_INTPTR_ALIGN,#defined(CHECK_INTPTR_ALIGN),,CHECK_INTPTR_ALIGN
-CHECK_INTPTR_NONNULL,#defined(CHECK_INTPTR_NONNULL)
-CHECK_FUNC_ALIGN,#defined(CHECK_FUNC_ALIGN),,CHECK_FUNC_ALIGN
-CHECK_FUNC_NONNULL,#defined(CHECK_FUNC_NONNULL)
-CHECK_STACK_ALIGN,#defined(CHECK_STACK_ALIGN),,CHECK_STACK_ALIGN
-CHECK_STACK_NONNULL,#defined(CHECK_STACK_NONNULL)
-CHECK_MPF_ALIGN,#defined(CHECK_MPF_ALIGN),,CHECK_MPF_ALIGN
-CHECK_MPF_NONNULL,#defined(CHECK_MPF_NONNULL)
-sizeof_void_ptr,sizeof(void*)
-sizeof_uint_t,sizeof(uint_t)
-sizeof_size_t,sizeof(size_t)
-sizeof_intptr_t,sizeof(intptr_t)
-sizeof_ID,sizeof(ID)
-sizeof_FP,sizeof(FP)
-sizeof_INHNO,sizeof(INHNO)
-sizeof_INTNO,sizeof(INTNO)
-sizeof_EXCNO,sizeof(EXCNO)
-sizeof_TINIB,sizeof(TINIB)
-offsetof_TINIB_tskatr,"offsetof(TINIB,tskatr)"
-offsetof_TINIB_exinf,"offsetof(TINIB,exinf)"
-offsetof_TINIB_task,"offsetof(TINIB,task)"
-offsetof_TINIB_ipriority,"offsetof(TINIB,ipriority)"
-offsetof_TINIB_stksz,#!defined(USE_TSKINICTXB),,"offsetof(TINIB,stksz)"
-offsetof_TINIB_stk,#!defined(USE_TSKINICTXB),,"offsetof(TINIB,stk)"
-sizeof_SEMINIB,sizeof(SEMINIB)
-offsetof_SEMINIB_sematr,"offsetof(SEMINIB,sematr)"
-offsetof_SEMINIB_isemcnt,"offsetof(SEMINIB,isemcnt)"
-offsetof_SEMINIB_maxsem,"offsetof(SEMINIB,maxsem)"
-sizeof_FLGPTN,sizeof(FLGPTN)
-sizeof_FLGINIB,sizeof(FLGINIB)
-offsetof_FLGINIB_flgatr,"offsetof(FLGINIB,flgatr)"
-offsetof_FLGINIB_iflgptn,"offsetof(FLGINIB,iflgptn)"
-sizeof_DTQINIB,sizeof(DTQINIB)
-offsetof_DTQINIB_dtqatr,"offsetof(DTQINIB,dtqatr)"
-offsetof_DTQINIB_dtqcnt,"offsetof(DTQINIB,dtqcnt)"
-offsetof_DTQINIB_p_dtqmb,"offsetof(DTQINIB,p_dtqmb)"
-sizeof_PDQINIB,sizeof(PDQINIB)
-offsetof_PDQINIB_pdqatr,"offsetof(PDQINIB,pdqatr)"
-offsetof_PDQINIB_pdqcnt,"offsetof(PDQINIB,pdqcnt)"
-offsetof_PDQINIB_maxdpri,"offsetof(PDQINIB,maxdpri)"
-offsetof_PDQINIB_p_pdqmb,"offsetof(PDQINIB,p_pdqmb)"
-sizeof_MTXINIB,sizeof(MTXINIB)
-offsetof_MTXINIB_mtxatr,"offsetof(MTXINIB,mtxatr)"
-offsetof_MTXINIB_ceilpri,"offsetof(MTXINIB,ceilpri)"
-sizeof_MPFINIB,sizeof(MPFINIB)
-offsetof_MPFINIB_mpfatr,"offsetof(MPFINIB,mpfatr)"
-offsetof_MPFINIB_blkcnt,"offsetof(MPFINIB,blkcnt)"
-offsetof_MPFINIB_blksz,"offsetof(MPFINIB,blksz)"
-offsetof_MPFINIB_mpf,"offsetof(MPFINIB,mpf)"
-offsetof_MPFINIB_p_mpfmb,"offsetof(MPFINIB,p_mpfmb)"
-sizeof_CYCINIB,sizeof(CYCINIB)
-offsetof_CYCINIB_cycatr,"offsetof(CYCINIB,cycatr)"
-offsetof_CYCINIB_exinf,"offsetof(CYCINIB,exinf)"
-offsetof_CYCINIB_nfyhdr,"offsetof(CYCINIB,nfyhdr)"
-offsetof_CYCINIB_cyctim,"offsetof(CYCINIB,cyctim)"
-offsetof_CYCINIB_cycphs,"offsetof(CYCINIB,cycphs)"
-sizeof_ALMINIB,sizeof(ALMINIB)
-offsetof_ALMINIB_almatr,"offsetof(ALMINIB,almatr)"
-offsetof_ALMINIB_exinf,"offsetof(ALMINIB,exinf)"
-offsetof_ALMINIB_nfyhdr,"offsetof(ALMINIB,nfyhdr)"
-sizeof_OVRINIB,#defined(TOPPERS_SUPPORT_OVRHDR),,sizeof(OVRINIB)
-offsetof_OVRINIB_ovratr,#defined(TOPPERS_SUPPORT_OVRHDR),,"offsetof(OVRINIB,ovratr)"
-offsetof_OVRINIB_ovrhdr,#defined(TOPPERS_SUPPORT_OVRHDR),,"offsetof(OVRINIB,ovrhdr)"
-sizeof_INHINIB,#!defined(OMIT_INITIALIZE_INTERRUPT),,sizeof(INHINIB)
-offset_INHINIB_inhno,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INHINIB,inhno)"
-offset_INHINIB_inhatr,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INHINIB,inhatr)"
-offset_INHINIB_int_entry,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INHINIB,int_entry)"
-sizeof_INTINIB,#!defined(OMIT_INITIALIZE_INTERRUPT),,sizeof(INTINIB)
-offset_INTINIB_intno,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INTINIB,intno)"
-offset_INTINIB_intatr,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INTINIB,intatr)"
-offset_INTINIB_intpri,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INTINIB,intpri)"
-sizeof_EXCINIB,#!defined(OMIT_INITIALIZE_EXCEPTION),,sizeof(EXCINIB)
-offset_EXCINIB_excno,#!defined(OMIT_INITIALIZE_EXCEPTION),,"offsetof(EXCINIB,excno)"
-offset_EXCINIB_excatr,#!defined(OMIT_INITIALIZE_EXCEPTION),,"offsetof(EXCINIB,excatr)"
-offset_EXCINIB_exc_entry,#!defined(OMIT_INITIALIZE_EXCEPTION),,"offsetof(EXCINIB,exc_entry)"
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_rename.h
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_rename.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_rename.h	(revision 306)
@@ -194,198 +194,4 @@
 
 
-#ifdef TOPPERS_LABEL_ASM
-
-/*
- *  startup.c
- */
-#define _kerflg						__kernel_kerflg
-#define _exit_kernel				__kernel_exit_kernel
-
-/*
- *  task.c
- */
-#define _p_runtsk					__kernel_p_runtsk
-#define _p_schedtsk					__kernel_p_schedtsk
-#define _enadsp						__kernel_enadsp
-#define _dspflg						__kernel_dspflg
-#define _ready_queue				__kernel_ready_queue
-#define _ready_primap				__kernel_ready_primap
-#define _initialize_task			__kernel_initialize_task
-#define _search_schedtsk			__kernel_search_schedtsk
-#define _make_runnable				__kernel_make_runnable
-#define _make_non_runnable			__kernel_make_non_runnable
-#define _make_dormant				__kernel_make_dormant
-#define _make_active				__kernel_make_active
-#define _change_priority			__kernel_change_priority
-#define _rotate_ready_queue			__kernel_rotate_ready_queue
-#define _task_terminate				__kernel_task_terminate
-
-/*
- *  taskhook.c
- */
-#define _mtxhook_check_ceilpri		__kernel_mtxhook_check_ceilpri
-#define _mtxhook_scan_ceilmtx		__kernel_mtxhook_scan_ceilmtx
-#define _mtxhook_release_all		__kernel_mtxhook_release_all
-
-/*
- *  wait.c
- */
-#define _make_wait_tmout			__kernel_make_wait_tmout
-#define _wait_complete				__kernel_wait_complete
-#define _wait_tmout					__kernel_wait_tmout
-#define _wait_tmout_ok				__kernel_wait_tmout_ok
-#define _wobj_make_wait				__kernel_wobj_make_wait
-#define _wobj_make_wait_tmout		__kernel_wobj_make_wait_tmout
-#define _init_wait_queue			__kernel_init_wait_queue
-
-/*
- *  time_event.c
- */
-#define _boundary_evttim			__kernel_boundary_evttim
-#define _current_evttim				__kernel_current_evttim
-#define _current_hrtcnt				__kernel_current_hrtcnt
-#define _monotonic_evttim			__kernel_monotonic_evttim
-#define _systim_offset				__kernel_systim_offset
-#define _in_signal_time				__kernel_in_signal_time
-#define _initialize_tmevt			__kernel_initialize_tmevt
-#define _tmevt_up					__kernel_tmevt_up
-#define _tmevt_down					__kernel_tmevt_down
-#define _update_current_evttim		__kernel_update_current_evttim
-#define _set_hrt_event				__kernel_set_hrt_event
-#define _tmevtb_register			__kernel_tmevtb_register
-#define _tmevtb_enqueue				__kernel_tmevtb_enqueue
-#define _tmevtb_dequeue				__kernel_tmevtb_dequeue
-#define _check_adjtim				__kernel_check_adjtim
-#define _tmevt_lefttim				__kernel_tmevt_lefttim
-#define _signal_time				__kernel_signal_time
-
-/*
- *  semaphore.c
- */
-#define _initialize_semaphore		__kernel_initialize_semaphore
-
-/*
- *  eventflag.c
- */
-#define _initialize_eventflag		__kernel_initialize_eventflag
-#define _check_flg_cond				__kernel_check_flg_cond
-
-/*
- *  dataqueue.c
- */
-#define _initialize_dataqueue		__kernel_initialize_dataqueue
-#define _enqueue_data				__kernel_enqueue_data
-#define _force_enqueue_data			__kernel_force_enqueue_data
-#define _dequeue_data				__kernel_dequeue_data
-#define _send_data					__kernel_send_data
-#define _force_send_data			__kernel_force_send_data
-#define _receive_data				__kernel_receive_data
-
-/*
- *  pridataq.c
- */
-#define _initialize_pridataq		__kernel_initialize_pridataq
-#define _enqueue_pridata			__kernel_enqueue_pridata
-#define _dequeue_pridata			__kernel_dequeue_pridata
-#define _send_pridata				__kernel_send_pridata
-#define _receive_pridata			__kernel_receive_pridata
-
-/*
- *  mutex.c
- */
-#define _initialize_mutex			__kernel_initialize_mutex
-#define _mutex_check_ceilpri		__kernel_mutex_check_ceilpri
-#define _mutex_scan_ceilmtx			__kernel_mutex_scan_ceilmtx
-#define _mutex_drop_priority		__kernel_mutex_drop_priority
-#define _mutex_acquire				__kernel_mutex_acquire
-#define _mutex_release				__kernel_mutex_release
-#define _mutex_release_all			__kernel_mutex_release_all
-
-/*
- *  mempfix.c
- */
-#define _initialize_mempfix			__kernel_initialize_mempfix
-#define _get_mpf_block				__kernel_get_mpf_block
-
-/*
- *  cyclic.c
- */
-#define _initialize_cyclic			__kernel_initialize_cyclic
-#define _call_cyclic				__kernel_call_cyclic
-
-/*
- *  alarm.c
- */
-#define _initialize_alarm			__kernel_initialize_alarm
-#define _call_alarm					__kernel_call_alarm
-
-/*
- *  overrun.c
- */
-#define _ovrtimer_flag				__kernel_ovrtimer_flag
-#define _initialize_overrun			__kernel_initialize_overrun
-#define _ovrtimer_start				__kernel_ovrtimer_start
-#define _ovrtimer_stop				__kernel_ovrtimer_stop
-#define _call_ovrhdr				__kernel_call_ovrhdr
-
-/*
- *  interrupt.c
- */
-#define _initialize_interrupt		__kernel_initialize_interrupt
-
-/*
- *  exception.c
- */
-#define _initialize_exception		__kernel_initialize_exception
-
-/*
- *  kernel_cfg.c
- */
-#define _initialize_object			__kernel_initialize_object
-#define _call_inirtn				__kernel_call_inirtn
-#define _call_terrtn				__kernel_call_terrtn
-#define _tmax_tskid					__kernel_tmax_tskid
-#define _tinib_table				__kernel_tinib_table
-#define _torder_table				__kernel_torder_table
-#define _tcb_table					__kernel_tcb_table
-#define _tmax_semid					__kernel_tmax_semid
-#define _seminib_table				__kernel_seminib_table
-#define _semcb_table				__kernel_semcb_table
-#define _tmax_flgid					__kernel_tmax_flgid
-#define _flginib_table				__kernel_flginib_table
-#define _flgcb_table				__kernel_flgcb_table
-#define _tmax_dtqid					__kernel_tmax_dtqid
-#define _dtqinib_table				__kernel_dtqinib_table
-#define _dtqcb_table				__kernel_dtqcb_table
-#define _tmax_pdqid					__kernel_tmax_pdqid
-#define _pdqinib_table				__kernel_pdqinib_table
-#define _pdqcb_table				__kernel_pdqcb_table
-#define _tmax_mtxid					__kernel_tmax_mtxid
-#define _mtxinib_table				__kernel_mtxinib_table
-#define _mtxcb_table				__kernel_mtxcb_table
-#define _tmax_mpfid					__kernel_tmax_mpfid
-#define _mpfinib_table				__kernel_mpfinib_table
-#define _mpfcb_table				__kernel_mpfcb_table
-#define _tmax_cycid					__kernel_tmax_cycid
-#define _cycinib_table				__kernel_cycinib_table
-#define _cyccb_table				__kernel_cyccb_table
-#define _tmax_almid					__kernel_tmax_almid
-#define _alminib_table				__kernel_alminib_table
-#define _almcb_table				__kernel_almcb_table
-#define _ovrinib					__kernel_ovrinib
-#define _tnum_def_inhno				__kernel_tnum_def_inhno
-#define _inhinib_table				__kernel_inhinib_table
-#define _tnum_cfg_intno				__kernel_tnum_cfg_intno
-#define _intinib_table				__kernel_intinib_table
-#define _tnum_def_excno				__kernel_tnum_def_excno
-#define _excinib_table				__kernel_excinib_table
-#define _tmevt_heap					__kernel_tmevt_heap
-#define _istksz						__kernel_istksz
-#define _istk						__kernel_istk
-#define _istkpt						__kernel_istkpt
-
-
-#endif /* TOPPERS_LABEL_ASM */
-
 #include "target_rename.h"
 
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_sym.def
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_sym.def	(revision 306)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_sym.def	(revision 306)
@@ -0,0 +1,148 @@
+TOPPERS_SUPPORT_OVRHDR,true,bool,defined(TOPPERS_SUPPORT_OVRHDR)
+USE_EXTERNAL_ID,true,bool,defined(USE_EXTERNAL_ID)
+SIL_ENDIAN_BIG,true,bool,defined(SIL_ENDIAN_BIG)
+SIL_ENDIAN_LITTLE,true,bool,defined(SIL_ENDIAN_LITTLE)
+TA_NULL
+TA_ACT
+TA_NOACTQUE
+TA_TPRI
+TA_WMUL
+TA_CLR
+TA_CEILING
+TA_STA
+TA_NONKERNEL
+TA_ENAINT
+TA_EDGE
+TNFY_HANDLER
+TNFY_SETVAR
+TNFY_INCVAR
+TNFY_ACTTSK
+TNFY_WUPTSK
+TNFY_SIGSEM
+TNFY_SETFLG
+TNFY_SNDDTQ
+TENFY_SETVAR
+TENFY_INCVAR
+TENFY_ACTTSK
+TENFY_WUPTSK
+TENFY_SIGSEM
+TENFY_SETFLG
+TENFY_SNDDTQ
+TMIN_TPRI,,signed
+TMAX_TPRI,,signed
+TMIN_DPRI,,signed
+TMAX_DPRI,,signed
+TMIN_ISRPRI,,signed
+TMAX_ISRPRI,,signed
+TBIT_FLGPTN
+TMAX_MAXSEM
+TMAX_RELTIM
+TMIN_INTPRI,,signed
+TMAX_INTPRI,,signed
+TMIN_TSKID,,signed
+TMIN_SEMID,,signed
+TMIN_FLGID,,signed
+TMIN_DTQID,,signed
+TMIN_PDQID,,signed
+TMIN_MTXID,,signed
+TMIN_MPFID,,signed
+TMIN_CYCID,,signed
+TMIN_ALMID,,signed
+USE_TSKINICTXB,true,bool,defined(USE_TSKINICTXB)
+OMIT_INITIALIZE_INTERRUPT,true,bool,defined(OMIT_INITIALIZE_INTERRUPT)
+USE_INHINIB_TABLE,true,bool,defined(USE_INHINIB_TABLE)
+USE_INTINIB_TABLE,true,bool,defined(USE_INTINIB_TABLE)
+OMIT_INITIALIZE_EXCEPTION,true,bool,defined(OMIT_INITIALIZE_EXCEPTION)
+DEFAULT_ISTK,,,defined(DEFAULT_ISTK)
+TARGET_TSKATR,,,defined(TARGET_TSKATR),0
+TARGET_INTATR,,,defined(TARGET_INTATR),0
+TARGET_INHATR,,,defined(TARGET_INHATR),0
+TARGET_ISRATR,,,defined(TARGET_ISRATR),0
+TARGET_EXCATR,,,defined(TARGET_EXCATR),0
+TARGET_MIN_STKSZ,,,defined(TARGET_MIN_STKSZ),1
+TARGET_MIN_ISTKSZ,,,defined(TARGET_MIN_ISTKSZ),1
+CHECK_STKSZ_ALIGN,,,defined(CHECK_STKSZ_ALIGN),1
+CHECK_INTPTR_ALIGN,,,defined(CHECK_INTPTR_ALIGN),1
+CHECK_INTPTR_NONNULL,true,bool,defined(CHECK_INTPTR_NONNULL)
+CHECK_FUNC_ALIGN,,,defined(CHECK_FUNC_ALIGN),1
+CHECK_FUNC_NONNULL,true,bool,defined(CHECK_FUNC_NONNULL)
+CHECK_STACK_ALIGN,,,defined(CHECK_STACK_ALIGN),1
+CHECK_STACK_NONNULL,true,bool,defined(CHECK_STACK_NONNULL)
+CHECK_MPF_ALIGN,,,defined(CHECK_MPF_ALIGN),1
+CHECK_MPF_NONNULL,true,bool,defined(CHECK_MPF_NONNULL)
+sizeof_void_ptr,sizeof(void*)
+sizeof_uint_t,sizeof(uint_t)
+sizeof_size_t,sizeof(size_t)
+sizeof_intptr_t,sizeof(intptr_t)
+sizeof_ID,sizeof(ID)
+sizeof_FP,sizeof(FP)
+sizeof_INTNO,sizeof(INTNO)
+sizeof_INHNO,sizeof(INHNO)
+sizeof_EXCNO,sizeof(EXCNO)
+sizeof_TASK,sizeof(TASK)
+sizeof_TMEHDR,sizeof(TMEHDR)
+sizeof_OVRHDR,sizeof(OVRHDR)
+sizeof_ISR,sizeof(ISR)
+sizeof_INTHDR,sizeof(INTHDR)
+sizeof_EXCHDR,sizeof(EXCHDR)
+sizeof_INIRTN,sizeof(INIRTN)
+sizeof_TERRTN,sizeof(TERRTN)
+sizeof_NFYHDR,sizeof(NFYHDR)
+sizeof_TINIB,sizeof(TINIB)
+offsetof_TINIB_tskatr,"offsetof(TINIB,tskatr)"
+offsetof_TINIB_exinf,"offsetof(TINIB,exinf)"
+offsetof_TINIB_task,"offsetof(TINIB,task)"
+offsetof_TINIB_ipriority,"offsetof(TINIB,ipriority)"
+offsetof_TINIB_stksz,"offsetof(TINIB,stksz)",,!defined(USE_TSKINICTXB)
+offsetof_TINIB_stk,"offsetof(TINIB,stk)",,!defined(USE_TSKINICTXB)
+sizeof_SEMINIB,sizeof(SEMINIB)
+offsetof_SEMINIB_sematr,"offsetof(SEMINIB,sematr)"
+offsetof_SEMINIB_isemcnt,"offsetof(SEMINIB,isemcnt)"
+offsetof_SEMINIB_maxsem,"offsetof(SEMINIB,maxsem)"
+sizeof_FLGPTN,sizeof(FLGPTN)
+sizeof_FLGINIB,sizeof(FLGINIB)
+offsetof_FLGINIB_flgatr,"offsetof(FLGINIB,flgatr)"
+offsetof_FLGINIB_iflgptn,"offsetof(FLGINIB,iflgptn)"
+sizeof_DTQINIB,sizeof(DTQINIB)
+offsetof_DTQINIB_dtqatr,"offsetof(DTQINIB,dtqatr)"
+offsetof_DTQINIB_dtqcnt,"offsetof(DTQINIB,dtqcnt)"
+offsetof_DTQINIB_p_dtqmb,"offsetof(DTQINIB,p_dtqmb)"
+sizeof_PDQINIB,sizeof(PDQINIB)
+offsetof_PDQINIB_pdqatr,"offsetof(PDQINIB,pdqatr)"
+offsetof_PDQINIB_pdqcnt,"offsetof(PDQINIB,pdqcnt)"
+offsetof_PDQINIB_maxdpri,"offsetof(PDQINIB,maxdpri)"
+offsetof_PDQINIB_p_pdqmb,"offsetof(PDQINIB,p_pdqmb)"
+sizeof_MTXINIB,sizeof(MTXINIB)
+offsetof_MTXINIB_mtxatr,"offsetof(MTXINIB,mtxatr)"
+offsetof_MTXINIB_ceilpri,"offsetof(MTXINIB,ceilpri)"
+sizeof_MPFINIB,sizeof(MPFINIB)
+offsetof_MPFINIB_mpfatr,"offsetof(MPFINIB,mpfatr)"
+offsetof_MPFINIB_blkcnt,"offsetof(MPFINIB,blkcnt)"
+offsetof_MPFINIB_blksz,"offsetof(MPFINIB,blksz)"
+offsetof_MPFINIB_mpf,"offsetof(MPFINIB,mpf)"
+offsetof_MPFINIB_p_mpfmb,"offsetof(MPFINIB,p_mpfmb)"
+sizeof_CYCINIB,sizeof(CYCINIB)
+offsetof_CYCINIB_cycatr,"offsetof(CYCINIB,cycatr)"
+offsetof_CYCINIB_exinf,"offsetof(CYCINIB,exinf)"
+offsetof_CYCINIB_nfyhdr,"offsetof(CYCINIB,nfyhdr)"
+offsetof_CYCINIB_cyctim,"offsetof(CYCINIB,cyctim)"
+offsetof_CYCINIB_cycphs,"offsetof(CYCINIB,cycphs)"
+sizeof_ALMINIB,sizeof(ALMINIB)
+offsetof_ALMINIB_almatr,"offsetof(ALMINIB,almatr)"
+offsetof_ALMINIB_exinf,"offsetof(ALMINIB,exinf)"
+offsetof_ALMINIB_nfyhdr,"offsetof(ALMINIB,nfyhdr)"
+sizeof_OVRINIB,sizeof(OVRINIB),,defined(TOPPERS_SUPPORT_OVRHDR)
+offsetof_OVRINIB_ovratr,"offsetof(OVRINIB,ovratr)",,defined(TOPPERS_SUPPORT_OVRHDR)
+offsetof_OVRINIB_ovrhdr,"offsetof(OVRINIB,ovrhdr)",,defined(TOPPERS_SUPPORT_OVRHDR)
+sizeof_INHINIB,sizeof(INHINIB),,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INHINIB_inhno,"offsetof(INHINIB,inhno)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INHINIB_inhatr,"offsetof(INHINIB,inhatr)",,!defined(OMIT_INITIALIZE_INTERRUPT),,
+offset_INHINIB_int_entry,"offsetof(INHINIB,int_entry)",,!defined(OMIT_INITIALIZE_INTERRUPT),,
+sizeof_INTINIB,sizeof(INTINIB),,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INTINIB_intno,"offsetof(INTINIB,intno)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INTINIB_intatr,"offsetof(INTINIB,intatr)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INTINIB_intpri,"offsetof(INTINIB,intpri)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+sizeof_EXCINIB,sizeof(EXCINIB),,!defined(OMIT_INITIALIZE_EXCEPTION)
+offset_EXCINIB_excno,"offsetof(EXCINIB,excno)",,!defined(OMIT_INITIALIZE_EXCEPTION)
+offset_EXCINIB_excatr,"offsetof(EXCINIB,excatr)",,!defined(OMIT_INITIALIZE_EXCEPTION)
+offset_EXCINIB_exc_entry,"offsetof(EXCINIB,exc_entry)",,!defined(OMIT_INITIALIZE_EXCEPTION)
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_unrename.h
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_unrename.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/kernel/kernel_unrename.h	(revision 306)
@@ -195,198 +195,4 @@
 
 
-#ifdef TOPPERS_LABEL_ASM
-
-/*
- *  startup.c
- */
-#undef _kerflg
-#undef _exit_kernel
-
-/*
- *  task.c
- */
-#undef _p_runtsk
-#undef _p_schedtsk
-#undef _enadsp
-#undef _dspflg
-#undef _ready_queue
-#undef _ready_primap
-#undef _initialize_task
-#undef _search_schedtsk
-#undef _make_runnable
-#undef _make_non_runnable
-#undef _make_dormant
-#undef _make_active
-#undef _change_priority
-#undef _rotate_ready_queue
-#undef _task_terminate
-
-/*
- *  taskhook.c
- */
-#undef _mtxhook_check_ceilpri
-#undef _mtxhook_scan_ceilmtx
-#undef _mtxhook_release_all
-
-/*
- *  wait.c
- */
-#undef _make_wait_tmout
-#undef _wait_complete
-#undef _wait_tmout
-#undef _wait_tmout_ok
-#undef _wobj_make_wait
-#undef _wobj_make_wait_tmout
-#undef _init_wait_queue
-
-/*
- *  time_event.c
- */
-#undef _boundary_evttim
-#undef _current_evttim
-#undef _current_hrtcnt
-#undef _monotonic_evttim
-#undef _systim_offset
-#undef _in_signal_time
-#undef _initialize_tmevt
-#undef _tmevt_up
-#undef _tmevt_down
-#undef _update_current_evttim
-#undef _set_hrt_event
-#undef _tmevtb_register
-#undef _tmevtb_enqueue
-#undef _tmevtb_dequeue
-#undef _check_adjtim
-#undef _tmevt_lefttim
-#undef _signal_time
-
-/*
- *  semaphore.c
- */
-#undef _initialize_semaphore
-
-/*
- *  eventflag.c
- */
-#undef _initialize_eventflag
-#undef _check_flg_cond
-
-/*
- *  dataqueue.c
- */
-#undef _initialize_dataqueue
-#undef _enqueue_data
-#undef _force_enqueue_data
-#undef _dequeue_data
-#undef _send_data
-#undef _force_send_data
-#undef _receive_data
-
-/*
- *  pridataq.c
- */
-#undef _initialize_pridataq
-#undef _enqueue_pridata
-#undef _dequeue_pridata
-#undef _send_pridata
-#undef _receive_pridata
-
-/*
- *  mutex.c
- */
-#undef _initialize_mutex
-#undef _mutex_check_ceilpri
-#undef _mutex_scan_ceilmtx
-#undef _mutex_drop_priority
-#undef _mutex_acquire
-#undef _mutex_release
-#undef _mutex_release_all
-
-/*
- *  mempfix.c
- */
-#undef _initialize_mempfix
-#undef _get_mpf_block
-
-/*
- *  cyclic.c
- */
-#undef _initialize_cyclic
-#undef _call_cyclic
-
-/*
- *  alarm.c
- */
-#undef _initialize_alarm
-#undef _call_alarm
-
-/*
- *  overrun.c
- */
-#undef _ovrtimer_flag
-#undef _initialize_overrun
-#undef _ovrtimer_start
-#undef _ovrtimer_stop
-#undef _call_ovrhdr
-
-/*
- *  interrupt.c
- */
-#undef _initialize_interrupt
-
-/*
- *  exception.c
- */
-#undef _initialize_exception
-
-/*
- *  kernel_cfg.c
- */
-#undef _initialize_object
-#undef _call_inirtn
-#undef _call_terrtn
-#undef _tmax_tskid
-#undef _tinib_table
-#undef _torder_table
-#undef _tcb_table
-#undef _tmax_semid
-#undef _seminib_table
-#undef _semcb_table
-#undef _tmax_flgid
-#undef _flginib_table
-#undef _flgcb_table
-#undef _tmax_dtqid
-#undef _dtqinib_table
-#undef _dtqcb_table
-#undef _tmax_pdqid
-#undef _pdqinib_table
-#undef _pdqcb_table
-#undef _tmax_mtxid
-#undef _mtxinib_table
-#undef _mtxcb_table
-#undef _tmax_mpfid
-#undef _mpfinib_table
-#undef _mpfcb_table
-#undef _tmax_cycid
-#undef _cycinib_table
-#undef _cyccb_table
-#undef _tmax_almid
-#undef _alminib_table
-#undef _almcb_table
-#undef _ovrinib
-#undef _tnum_def_inhno
-#undef _inhinib_table
-#undef _tnum_cfg_intno
-#undef _intinib_table
-#undef _tnum_def_excno
-#undef _excinib_table
-#undef _tmevt_heap
-#undef _istksz
-#undef _istk
-#undef _istkpt
-
-
-#endif /* TOPPERS_LABEL_ASM */
-
 #include "target_unrename.h"
 
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/overrun.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/overrun.tf	(revision 302)
+++ 	(revision )
@@ -1,106 +1,0 @@
-$ 
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2015 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$  
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$  
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: overrun.tf 444 2015-08-13 04:39:19Z ertl-hiro $
-$  
-
-$
-$		ãªã¼ãã©ã³ãã³ãã©æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  ãªã¼ãã©ã³ãã³ãã©ããµãã¼ãããã¦ããªãå ´åã®ã¨ã©ã¼ãã§ãã¯
-$
-$IF !TOPPERS_SUPPORT_OVRHDR$
-	$IF LENGTH(OVR.ORDER_LIST)$
-		$ERROR$E_NOSPT:$SPC$
-			$FORMAT(_("%1% is not supported on this target"), "DEF_OVR")$
-		$END$
-	$END$
-$ELSE$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Overrun Handler Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$IF LENGTH(OVR.ORDER_LIST)$
-$	// éçAPIãDEF_OVRããè¤æ°ããï¼E_OBJï¼
-	$IF LENGTH(OVR.ORDER_LIST) > 1$
-		$ERROR$E_OBJ: $FORMAT(_("too many %1%"), "DEF_OVR")$$END$
-	$END$
-
-$	// ovratrãï¼TA_NULLï¼ã§ãªãå ´åï¼E_RSATRï¼
-	$IF OVR.OVRATR[1] != 0$
-		$ERROR OVR.TEXT_LINE[1]$E_RSATR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-						"ovratr", OVR.OVRATR[1], "DEF_OVR")$
-		$END$
-	$END$
-
-$	// ãªã¼ãã©ã³ãã³ãã©åæåãã­ãã¯
-	const OVRINIB _kernel_ovrinib[1] = {$NL$
-		$TAB${ ($OVR.OVRATR[1]$), (OVRHDR)($OVR.OVRHDR[1]$) }$NL$
-	};$NL$
-
-	$initfuncs = APPEND(initfuncs, "_kernel_initialize_overrun();")$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const OVRINIB, _kernel_ovrinib);$NL$
-$END$$NL$
-
-$END$
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/overrun.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/overrun.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/kernel/overrun.trb	(revision 306)
@@ -0,0 +1,100 @@
+# -*- coding: utf-8 -*-
+# 
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+#  
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+#  
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: overrun.trb 581 2016-02-04 06:23:23Z ertl-hiro $
+#  
+
+#
+#		ãªã¼ãã©ã³ãã³ãã©æ©è½ã®çæã¹ã¯ãªãã
+#
+
+#
+#  ãªã¼ãã©ã³ãã³ãã©ããµãã¼ãããã¦ããªãå ´åã®ã¨ã©ã¼ãã§ãã¯
+#
+if !$TOPPERS_SUPPORT_OVRHDR
+  if $cfgData.has_key?(:DEF_OVR)
+    error("E_NOSPT: DEF_OVR is not supported on this target")
+  end
+end
+
+#
+#  ãªã¼ãã©ã³ãã³ãã©æ©è½ã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Overrun Handler Functions")
+
+if $cfgData[:DEF_OVR].size() > 0
+  # éçAPIãDEF_OVRããè¤æ°ããï¼E_OBJï¼ï¼»NGKI2619ï¼½
+  if $cfgData[:DEF_OVR].size() > 1
+    error("E_OBJ: too many DEF_OVR")
+  end
+
+  params = $cfgData[:DEF_OVR][1]
+
+  # ovratrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2612ï¼½
+  #ï¼TA_NULLã§ãªãå ´åï¼
+  if params[:ovratr] != $TA_NULL
+    error_illegal("E_RSATR", params, :ovratr)
+  end
+
+  #	ãªã¼ãã©ã³ãã³ãã©åæåãã­ãã¯ã®çæ
+  $kernelCfgC.add("const OVRINIB _kernel_ovrinib[1] = {")
+  $kernelCfgC.add("\t{ (#{params[:ovratr]}), (OVRHDR)(#{params[:ovrhdr]}) }")
+  $kernelCfgC.add2("};")
+
+  # ãªã¼ãã©ã³ãã³ãã©æ©è½åæåé¢æ°ã®è¿½å 
+  $initializeFunctions.push("_kernel_initialize_overrun();")
+else
+  $kernelCfgC.add2("TOPPERS_EMPTY_LABEL(const OVRINIB, _kernel_ovrinib);")
+end
Index: asp3_wo_tecs/trunk/extension/ovrhdr/kernel/sys_manage.c
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/kernel/sys_manage.c	(revision 302)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/kernel/sys_manage.c	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: sys_manage.c 470 2015-12-30 09:50:36Z ertl-hiro $
+ *  $Id: sys_manage.c 684 2016-03-11 15:24:12Z ertl-hiro $
  */
 
@@ -175,5 +175,5 @@
 /*
  *  ã¿ã¹ã¯ã®åªå
-é ä½ã®åè»¢
+é ä½ã®åè»¢ï¼»NGKI3548ï¼½
  */
 #ifdef TOPPERS_rot_rdq
@@ -186,10 +186,10 @@
 
 	LOG_ROT_RDQ_ENTER(tskpri);
-	CHECK_UNL();
+	CHECK_UNL();								/*ï¼»NGKI2684ï¼½*/
 	if (tskpri == TPRI_SELF && !sense_context()) {
-		pri = p_runtsk->bpriority;
+		pri = p_runtsk->bpriority;				/*ï¼»NGKI2689ï¼½*/
 	}
 	else {
-		CHECK_PAR(VALID_TPRI(tskpri));
+		CHECK_PAR(VALID_TPRI(tskpri));			/*ï¼»NGKI2685ï¼½*/
 		pri = INT_PRIORITY(tskpri);
 	}
@@ -218,5 +218,5 @@
  *  å®è¡ç¶æ
 ã®ã¿ã¹ã¯IDã®åç
-§
+§ï¼»NGKI3550ï¼½
  */
 #ifdef TOPPERS_get_tid
@@ -228,5 +228,5 @@
 
 	LOG_GET_TID_ENTER(p_tskid);
-	CHECK_UNL();
+	CHECK_UNL();								/*ï¼»NGKI2707ï¼½*/
 
 	lock_cpu();
@@ -244,5 +244,5 @@
 /*
  *  å®è¡ã§ããã¿ã¹ã¯ã®æ°ã®åç
-§
+§ï¼»NGKI3623ï¼½
  */
 #ifdef TOPPERS_get_lod
@@ -256,10 +256,10 @@
 
 	LOG_GET_LOD_ENTER(p_tskid, p_load);
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI3624ï¼½ï¼»NGKI3625ï¼½*/
 	if (tskpri == TPRI_SELF) {
-		pri = p_runtsk->bpriority;
+		pri = p_runtsk->bpriority;				/*ï¼»NGKI3631ï¼½*/
 	}
 	else {
-		CHECK_PAR(VALID_TPRI(tskpri));
+		CHECK_PAR(VALID_TPRI(tskpri));			/*ï¼»NGKI3626ï¼½*/
 		pri = INT_PRIORITY(tskpri);
 	}
@@ -286,5 +286,5 @@
  *  æå®ããåªå
 é ä½ã®ã¿ã¹ã¯IDã®åç
-§
+§ï¼»NGKI3641ï¼½
  */
 #ifdef TOPPERS_get_nth
@@ -299,10 +299,10 @@
 
 	LOG_GET_NTH_ENTER(p_tskid, nth, p_tskid);
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI3642ï¼½ï¼»NGKI3643ï¼½*/
 	if (tskpri == TPRI_SELF) {
-		pri = p_runtsk->bpriority;
+		pri = p_runtsk->bpriority;				/*ï¼»NGKI3650ï¼½*/
 	}
 	else {
-		CHECK_PAR(VALID_TPRI(tskpri));
+		CHECK_PAR(VALID_TPRI(tskpri));			/*ï¼»NGKI3644ï¼½*/
 		pri = INT_PRIORITY(tskpri);
 	}
@@ -332,5 +332,5 @@
 /*
  *  CPUã­ãã¯ç¶æ
-ã¸ã®é·ç§»
+ã¸ã®é·ç§»ï¼»NGKI3538ï¼½
  */
 #ifdef TOPPERS_loc_cpu
@@ -343,6 +343,6 @@
 	LOG_LOC_CPU_ENTER();
 
-	if (!sense_lock()) {
-		lock_cpu();
+	if (!sense_lock()) {						/*ï¼»NGKI2731ï¼½*/
+		lock_cpu();								/*ï¼»NGKI2730ï¼½*/
 	}
 	ercd = E_OK;
@@ -356,5 +356,5 @@
 /*
  *  CPUã­ãã¯ç¶æ
-ã®è§£é¤
+ã®è§£é¤ï¼»NGKI3539ï¼½
  *
  *  CPUã­ãã¯ä¸­ã¯ï¼ãã£ã¹ããããå¿
@@ -374,6 +374,6 @@
 	LOG_UNL_CPU_ENTER();
 
-	if (sense_lock()) {
-		unlock_cpu();
+	if (sense_lock()) {							/*ï¼»NGKI2738ï¼½*/
+		unlock_cpu();							/*ï¼»NGKI2737ï¼½*/
 	}
 	ercd = E_OK;
@@ -386,5 +386,5 @@
 
 /*
- *  ãã£ã¹ãããã®ç¦æ­¢
+ *  ãã£ã¹ãããã®ç¦æ­¢ï¼»NGKI2740ï¼½
  */
 #ifdef TOPPERS_dis_dsp
@@ -396,5 +396,5 @@
 
 	LOG_DIS_DSP_ENTER();
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI2741ï¼½ï¼»NGKI2742ï¼½*/
 
 	lock_cpu();
@@ -412,5 +412,5 @@
 
 /*
- *  ãã£ã¹ãããã®è¨±å¯
+ *  ãã£ã¹ãããã®è¨±å¯ï¼»NGKI2746ï¼½
  */
 #ifdef TOPPERS_ena_dsp
@@ -422,5 +422,5 @@
 
 	LOG_ENA_DSP_ENTER();
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI2747ï¼½ï¼»NGKI2748ï¼½*/
 
 	lock_cpu();
@@ -461,5 +461,5 @@
 /*
  *  ã³ã³ãã­ã¹ãã®åç
-§
+§ï¼»NGKI2752ï¼½
  */
 #ifdef TOPPERS_sns_ctx
@@ -481,5 +481,5 @@
  *  CPUã­ãã¯ç¶æ
 ã®åç
-§
+§ï¼»NGKI2754ï¼½
  */
 #ifdef TOPPERS_sns_loc
@@ -501,5 +501,5 @@
  *  ãã£ã¹ãããç¦æ­¢ç¶æ
 ã®åç
-§
+§ï¼»NGKI2756ï¼½
  */
 #ifdef TOPPERS_sns_dsp
@@ -521,5 +521,5 @@
  *  ãã£ã¹ãããä¿çç¶æ
 ã®åç
-§
+§ï¼»NGKI2758ï¼½
  */
 #ifdef TOPPERS_sns_dpn
@@ -541,5 +541,5 @@
  *  ã«ã¼ãã«éåä½ç¶æ
 ã®åç
-§
+§ï¼»NGKI2760ï¼½
  */
 #ifdef TOPPERS_sns_ker
Index: asp3_wo_tecs/trunk/extension/ovrhdr/sample/sample1.c
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/sample/sample1.c	(revision 302)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/sample/sample1.c	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2004-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2004-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: sample1.c 216 2014-09-23 12:13:52Z ertl-hiro $
+ *  $Id: sample1.c 725 2016-04-02 21:50:49Z ertl-hiro $
  */
 
@@ -254,4 +254,19 @@
 
 /*
+ *  å²è¾¼ã¿ãã³ãã©
+ */
+#ifdef INTNO1
+
+void intno1_isr(intptr_t exinf)
+{
+	intno1_clear();
+	SVC_PERROR(rot_rdq(HIGH_PRIORITY));
+	SVC_PERROR(rot_rdq(MID_PRIORITY));
+	SVC_PERROR(rot_rdq(LOW_PRIORITY));
+}
+
+#endif /* INTNO1 */
+
+/*
  *  CPUä¾å¤ãã³ãã©
  */
@@ -281,6 +296,13 @@
 	}
 
+#ifdef PREPARE_RETURN_CPUEXC
+	PREPARE_RETURN_CPUEXC;
 	SVC_PERROR(get_tid(&cpuexc_tskid));
 	SVC_PERROR(act_tsk(EXC_TASK));
+#else /* PREPARE_RETURN_CPUEXC */
+	syslog(LOG_NOTICE, "Sample program ends with exception.");
+	SVC_PERROR(ext_ker());
+	assert(0);
+#endif /* PREPARE_RETURN_CPUEXC */
 }
 
Index: asp3_wo_tecs/trunk/extension/ovrhdr/sample/sample1.cfg
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/sample/sample1.cfg	(revision 302)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/sample/sample1.cfg	(revision 306)
@@ -1,14 +1,8 @@
 /*
- *  $Id: sample1.cfg 329 2015-06-21 06:55:08Z ertl-hiro $
+ *		ãµã³ãã«ãã­ã°ã©ã (1)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
+ *
+ *  $Id: sample1.cfg 725 2016-04-02 21:50:49Z ertl-hiro $
  */
-
-/*
- *  ãµã³ãã«ãã­ã°ã©ã (1)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
- */
-INCLUDE("target_timer.cfg");
-INCLUDE("syssvc/syslog.cfg");
-INCLUDE("syssvc/banner.cfg");
-INCLUDE("syssvc/serial.cfg");
-INCLUDE("syssvc/logtask.cfg");
+INCLUDE("tecsgen.cfg");
 
 #include "sample1.h"
@@ -23,4 +17,8 @@
 DEF_OVR({ TA_NULL, overrun_handler });
 #endif /* TOPPERS_SUPPORT_OVRHDR */
+#ifdef INTNO1
+CFG_INT(INTNO1, { INTNO1_INTATR, INTNO1_INTPRI });
+CRE_ISR(INTNO1_ISR, { TA_NULL, 0, INTNO1, intno1_isr, 1 });
+#endif /* INTNO1 */
 #ifdef CPUEXC1
 DEF_EXC(CPUEXC1, { TA_NULL, cpuexc_handler });
Index: asp3_wo_tecs/trunk/extension/ovrhdr/sample/sample1.h
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/sample/sample1.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/sample/sample1.h	(revision 306)
@@ -6,5 +6,5 @@
  *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
  *                              Toyohashi Univ. of Technology, JAPAN
- *  Copyright (C) 2004-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2004-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  *
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  *
- *  $Id: sample1.h 410 2015-08-03 21:54:44Z ertl-hiro $
+ *  $Id: sample1.h 725 2016-04-02 21:50:49Z ertl-hiro $
  */
 
@@ -108,4 +108,7 @@
 extern void	main_task(intptr_t exinf);
 extern void exc_task(intptr_t exinf);
+#ifdef INTNO1
+extern void intno1_isr(intptr_t exinf);
+#endif /* INTNO1 */
 #ifdef CPUEXC1
 extern void	cpuexc_handler(void *p_excinf);
Index: asp3_wo_tecs/trunk/extension/ovrhdr/test/test_ovrhdr1.c
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/test/test_ovrhdr1.c	(revision 302)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/test/test_ovrhdr1.c	(revision 306)
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_ovrhdr1.c 444 2015-08-13 04:39:19Z ertl-hiro $
+ *  $Id: test_ovrhdr1.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -78,13 +78,13 @@
  *	1:	ref_ovr(TASK2, &rovr)
  *		assert(rovr.ovrstat == TOVR_STP)
- *		// TASK2, TASK3ã«å¯¾ãã¦ï¼æ®ããã­ã»ããµæé20000Î¼ç§ã§ï¼ãªã¼ãã©ã³
- *		// ãã³ãã©ãåä½éå§ãã
- *		sta_ovr(TASK2, 20000U)
+ *		// TASK2, TASK3ã«å¯¾ãã¦ï¼æ®ããã­ã»ããµæé(4 * TEST_TIME_CP)
+ *		// Î¼ç§ã§ï¼ãªã¼ãã©ã³ãã³ãã©ãåä½éå§ãã
+ *		sta_ovr(TASK2, 4 * TEST_TIME_CP)
  *		ref_ovr(TASK2, &rovr)
  *		assert(rovr.ovrstat == TOVR_STA)
- *		assert(rovr.leftotm == 20000U)
- *		sta_ovr(TASK3, 20000U)
- *		// 10000Î¼ç§å¾ã«ALM1ãåä½ããã
- *		sta_alm(ALM1, 10000U)
+ *		assert(rovr.leftotm == 4 * TEST_TIME_CP)
+ *		sta_ovr(TASK3, 4 * TEST_TIME_CP)
+ *		// (2 * TEST_TIME_CP)Î¼ç§å¾ã«ALM1ãåä½ããã
+ *		sta_alm(ALM1, 2 * TEST_TIME_CP) ... ALM1-1ãå®è¡éå§ããã¾ã§
  *		DO(hrtcnt1 = fch_hrt())
  *		act_tsk(TASK2)
@@ -107,5 +107,5 @@
  *	4:	ref_ovr(TASK2, &rovr)
  *		assert(rovr.ovrstat == TOVR_STA)
- *		assert(5000U <= rovr.leftotm && rovr.leftotm <= 15000U)
+ *		assert(TEST_TIME_CP <= rovr.leftotm && rovr.leftotm <= 3 * TEST_TIME_CP)
  *		DO(while(!task3_flag1))
  *	== OVR-1ï¼1åç®ï¼==
@@ -129,9 +129,10 @@
  *	== TASK1ï¼ç¶ãï¼==
  *	10:	DO(hrtcnt2 = fch_hrt())
- *		assert(40000U <= hrtcnt2 - hrtcnt1 && hrtcnt2 - hrtcnt1 <= 50000U)
+ *		assert(8 * TEST_TIME_CP <= hrtcnt2 - hrtcnt1 \
+ *							&& hrtcnt2 - hrtcnt1 <= 12 * TEST_TIME_CP)
  *		ref_ovr(TASK2, &rovr)
  *		assert(rovr.ovrstat == TOVR_STP)
- *		sta_ovr(TASK2, 20000U)
- *		sta_alm(ALM1, 10000U)
+ *		sta_ovr(TASK2, 4 * TEST_TIME_CP)
+ *		sta_alm(ALM1, 2 * TEST_TIME_CP) ... ALM1-2ãå®è¡éå§ããã¾ã§
  *		DO(hrtcnt1 = fch_hrt())
  *		wup_tsk(TASK2)
@@ -150,9 +151,9 @@
  *		// dispatch_rã§ãªã¼ãã©ã³ã¿ã¤ããåæ­¢ãã
  *	== TASK3ï¼ç¶ãï¼==
- *	14:	sta_alm(ALM1, 10000U)
- *		sta_ovr(TSK_SELF, 20000U)
+ *	14:	sta_alm(ALM1, 2 * TEST_TIME_CP) ... ALM1-3ãå®è¡éå§ããã¾ã§
+ *		sta_ovr(TSK_SELF, 4 * TEST_TIME_CP)
  *		// sta_ovrã§ãªã¼ãã©ã³ã¿ã¤ããåä½éå§ãã
- *		// TASK2ã®æ®ããã­ã»ããµæéã20000Î¼ç§ã«è¨­å®ããªãã
- *		sta_ovr(TASK2, 20000U)
+ *		// TASK2ã®æ®ããã­ã»ããµæéã(4 * TEST_TIME_CP)Î¼ç§ã«è¨­å®ããªãã
+ *		sta_ovr(TASK2, 4 * TEST_TIME_CP)
  *	15:	DO(while(!task3_flag2))
  *	== ALM1-3ï¼3åç®ï¼==
@@ -163,6 +164,6 @@
  *		RETURN
  *	== TASK3ï¼ç¶ãï¼==
- *		// TASK3ã®æ®ããã­ã»ããµæéã20000Î¼ç§ã«è¨­å®ããªãã
- *	17:	sta_ovr(TSK_SELF, 20000U)
+ *		// TASK3ã®æ®ããã­ã»ããµæéã(4 * TEST_TIME_CP)Î¼ç§ã«è¨­å®ããªãã
+ *	17:	sta_ovr(TSK_SELF, 4 * TEST_TIME_CP)
  *		// sta_ovrã§ãªã¼ãã©ã³ã¿ã¤ããåæ­¢ï¼åä½éå§ãã
  *		DO(while(!task3_flag3))
@@ -170,7 +171,7 @@
  *		// TASK3ã®æ®ããã­ã»ããµæéããªããªã
  *	18:	DO(task3_flag3 = true)
- *		sta_ovr(TSK_SELF, 20000U) -> E_ID
- *		// TASK3ã®æ®ããã­ã»ããµæéã20000Î¼ç§ã«è¨­å®ããªãã
- *		sta_ovr(TASK3, 10000U)
+ *		sta_ovr(TSK_SELF, 4 * TEST_TIME_CP) -> E_ID
+ *		// TASK3ã®æ®ããã­ã»ããµæéã(4 * TEST_TIME_CP)Î¼ç§ã«è¨­å®ããªãã
+ *		sta_ovr(TASK3, 2 * TEST_TIME_CP)
  *		RETURN
  *	== TASK3ï¼ç¶ãï¼==
@@ -194,5 +195,6 @@
  *	== TASK1ï¼ç¶ãï¼==
  *	25:	DO(hrtcnt2 = fch_hrt())
- *		assert(70000U <= hrtcnt2 - hrtcnt1 && hrtcnt2 - hrtcnt1 <= 80000U)
+ *		assert(14 * TEST_TIME_CP <= hrtcnt2 - hrtcnt1 \
+ *							&& hrtcnt2 - hrtcnt1 <= 19 * TEST_TIME_CP)
  *	26:	END
  */
@@ -288,8 +290,8 @@
 		task3_flag3 = true;
 
-		ercd = sta_ovr(TSK_SELF, 20000U);
+		ercd = sta_ovr(TSK_SELF, 4 * TEST_TIME_CP);
 		check_ercd(ercd, E_ID);
 
-		ercd = sta_ovr(TASK3, 10000U);
+		ercd = sta_ovr(TASK3, 2 * TEST_TIME_CP);
 		check_ercd(ercd, E_OK);
 
@@ -326,6 +328,6 @@
 task1(intptr_t exinf)
 {
+	ER_UINT	ercd;
 	T_ROVR	rovr;
-	ER_UINT	ercd;
 
 	test_start(__FILE__);
@@ -337,5 +339,5 @@
 	check_assert(rovr.ovrstat == TOVR_STP);
 
-	ercd = sta_ovr(TASK2, 20000U);
+	ercd = sta_ovr(TASK2, 4 * TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -345,10 +347,10 @@
 	check_assert(rovr.ovrstat == TOVR_STA);
 
-	check_assert(rovr.leftotm == 20000U);
-
-	ercd = sta_ovr(TASK3, 20000U);
-	check_ercd(ercd, E_OK);
-
-	ercd = sta_alm(ALM1, 10000U);
+	check_assert(rovr.leftotm == 4 * TEST_TIME_CP);
+
+	ercd = sta_ovr(TASK3, 4 * TEST_TIME_CP);
+	check_ercd(ercd, E_OK);
+
+	ercd = sta_alm(ALM1, 2 * TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -361,5 +363,5 @@
 	hrtcnt2 = fch_hrt();
 
-	check_assert(40000U <= hrtcnt2 - hrtcnt1 && hrtcnt2 - hrtcnt1 <= 50000U);
+	check_assert(8 * TEST_TIME_CP <= hrtcnt2 - hrtcnt1 && hrtcnt2 - hrtcnt1 <= 12 * TEST_TIME_CP);
 
 	ercd = ref_ovr(TASK2, &rovr);
@@ -368,8 +370,8 @@
 	check_assert(rovr.ovrstat == TOVR_STP);
 
-	ercd = sta_ovr(TASK2, 20000U);
-	check_ercd(ercd, E_OK);
-
-	ercd = sta_alm(ALM1, 10000U);
+	ercd = sta_ovr(TASK2, 4 * TEST_TIME_CP);
+	check_ercd(ercd, E_OK);
+
+	ercd = sta_alm(ALM1, 2 * TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -382,5 +384,5 @@
 	hrtcnt2 = fch_hrt();
 
-	check_assert(70000U <= hrtcnt2 - hrtcnt1 && hrtcnt2 - hrtcnt1 <= 80000U);
+	check_assert(14 * TEST_TIME_CP <= hrtcnt2 - hrtcnt1 && hrtcnt2 - hrtcnt1 <= 19 * TEST_TIME_CP);
 
 	check_finish(26);
@@ -429,6 +431,6 @@
 task3(intptr_t exinf)
 {
+	ER_UINT	ercd;
 	T_ROVR	rovr;
-	ER_UINT	ercd;
 
 	check_point(4);
@@ -438,5 +440,5 @@
 	check_assert(rovr.ovrstat == TOVR_STA);
 
-	check_assert(5000U <= rovr.leftotm && rovr.leftotm <= 15000U);
+	check_assert(TEST_TIME_CP <= rovr.leftotm && rovr.leftotm <= 3 * TEST_TIME_CP);
 
 	while(!task3_flag1);
@@ -449,11 +451,11 @@
 
 	check_point(14);
-	ercd = sta_alm(ALM1, 10000U);
-	check_ercd(ercd, E_OK);
-
-	ercd = sta_ovr(TSK_SELF, 20000U);
-	check_ercd(ercd, E_OK);
-
-	ercd = sta_ovr(TASK2, 20000U);
+	ercd = sta_alm(ALM1, 2 * TEST_TIME_CP);
+	check_ercd(ercd, E_OK);
+
+	ercd = sta_ovr(TSK_SELF, 4 * TEST_TIME_CP);
+	check_ercd(ercd, E_OK);
+
+	ercd = sta_ovr(TASK2, 4 * TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
@@ -462,5 +464,5 @@
 
 	check_point(17);
-	ercd = sta_ovr(TSK_SELF, 20000U);
+	ercd = sta_ovr(TSK_SELF, 4 * TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
Index: asp3_wo_tecs/trunk/extension/ovrhdr/test/test_ovrhdr1.cfg
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/test/test_ovrhdr1.cfg	(revision 302)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/test/test_ovrhdr1.cfg	(revision 306)
@@ -3,10 +3,7 @@
  *		ã³ãã¡ã¤ã«
  *
- *  $Id: test_ovrhdr1.cfg 327 2015-06-21 06:42:01Z ertl-hiro $
+ *  $Id: test_ovrhdr1.cfg 572 2016-02-01 14:40:09Z ertl-hiro $
  */
-INCLUDE("target_timer.cfg");
-INCLUDE("syssvc/syslog.cfg");
-INCLUDE("syssvc/banner.cfg");
-INCLUDE("syssvc/serial.cfg");
+INCLUDE("tecsgen.cfg");
 
 #include "test_ovrhdr1.h"
Index: asp3_wo_tecs/trunk/extension/ovrhdr/test/test_ovrhdr1.h
===================================================================
--- asp3_wo_tecs/trunk/extension/ovrhdr/test/test_ovrhdr1.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/ovrhdr/test/test_ovrhdr1.h	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2014-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_ovrhdr1.h 233 2014-09-28 09:38:43Z ertl-hiro $
+ *  $Id: test_ovrhdr1.h 737 2016-04-05 13:11:23Z ertl-hiro $
  */
 
@@ -80,4 +80,13 @@
 #endif /* STACK_SIZE */
 
+#ifndef TEST_TIME_CP
+#define TEST_TIME_CP	50000U		/* ãã§ãã¯ãã¤ã³ãå°éæ
+å ±ã®åºåæé */
+#endif /* TEST_TIME_CP */
+
+#ifndef TEST_TIME_PROC
+#define TEST_TIME_PROC	1000U		/* ãã§ãã¯ãã¤ã³ããéããªãå ´åã®æé */
+#endif /* TEST_TIME_PROC */
+
 /*
  *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
Index: asp3_wo_tecs/trunk/extension/pri_level/include/kernel.h
===================================================================
--- asp3_wo_tecs/trunk/extension/pri_level/include/kernel.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/pri_level/include/kernel.h	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: kernel.h 463 2015-10-18 14:25:55Z ertl-hiro $
+ *  $Id: kernel.h 654 2016-02-20 12:59:31Z ertl-hiro $
  */
 
@@ -550,6 +550,6 @@
 #define TKERNEL_MAKER	UINT_C(0x0118)	/* ã«ã¼ãã«ã®ã¡ã¼ã«ã¼ã³ã¼ã */
 #define TKERNEL_PRID	UINT_C(0x0007)	/* ã«ã¼ãã«ã®è­å¥çªå· */
-#define TKERNEL_SPVER	UINT_C(0xf630)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
-#define TKERNEL_PRVER	UINT_C(0x30b0)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_SPVER	UINT_C(0xf631)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_PRVER	UINT_C(0x3010)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
 
 /*
Index: asp3_wo_tecs/trunk/extension/pri_level/kernel/kernel_rename.h
===================================================================
--- asp3_wo_tecs/trunk/extension/pri_level/kernel/kernel_rename.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/pri_level/kernel/kernel_rename.h	(revision 306)
@@ -186,190 +186,4 @@
 
 
-#ifdef TOPPERS_LABEL_ASM
-
-/*
- *  startup.c
- */
-#define _kerflg						__kernel_kerflg
-#define _exit_kernel				__kernel_exit_kernel
-
-/*
- *  task.c
- */
-#define _p_runtsk					__kernel_p_runtsk
-#define _p_schedtsk					__kernel_p_schedtsk
-#define _enadsp						__kernel_enadsp
-#define _dspflg						__kernel_dspflg
-#define _ready_queue				__kernel_ready_queue
-#define _ready_primap				__kernel_ready_primap
-#define _ready_primap1				__kernel_ready_primap1
-#define _ready_primap2				__kernel_ready_primap2
-#define _initialize_task			__kernel_initialize_task
-#define _search_schedtsk			__kernel_search_schedtsk
-#define _make_runnable				__kernel_make_runnable
-#define _make_non_runnable			__kernel_make_non_runnable
-#define _make_dormant				__kernel_make_dormant
-#define _make_active				__kernel_make_active
-#define _change_priority			__kernel_change_priority
-#define _rotate_ready_queue			__kernel_rotate_ready_queue
-#define _task_terminate				__kernel_task_terminate
-
-/*
- *  taskhook.c
- */
-#define _mtxhook_check_ceilpri		__kernel_mtxhook_check_ceilpri
-#define _mtxhook_scan_ceilmtx		__kernel_mtxhook_scan_ceilmtx
-#define _mtxhook_release_all		__kernel_mtxhook_release_all
-
-/*
- *  wait.c
- */
-#define _make_wait_tmout			__kernel_make_wait_tmout
-#define _wait_complete				__kernel_wait_complete
-#define _wait_tmout					__kernel_wait_tmout
-#define _wait_tmout_ok				__kernel_wait_tmout_ok
-#define _wobj_make_wait				__kernel_wobj_make_wait
-#define _wobj_make_wait_tmout		__kernel_wobj_make_wait_tmout
-#define _init_wait_queue			__kernel_init_wait_queue
-
-/*
- *  time_event.c
- */
-#define _boundary_evttim			__kernel_boundary_evttim
-#define _current_evttim				__kernel_current_evttim
-#define _current_hrtcnt				__kernel_current_hrtcnt
-#define _monotonic_evttim			__kernel_monotonic_evttim
-#define _systim_offset				__kernel_systim_offset
-#define _in_signal_time				__kernel_in_signal_time
-#define _initialize_tmevt			__kernel_initialize_tmevt
-#define _tmevt_up					__kernel_tmevt_up
-#define _tmevt_down					__kernel_tmevt_down
-#define _update_current_evttim		__kernel_update_current_evttim
-#define _set_hrt_event				__kernel_set_hrt_event
-#define _tmevtb_register			__kernel_tmevtb_register
-#define _tmevtb_enqueue				__kernel_tmevtb_enqueue
-#define _tmevtb_dequeue				__kernel_tmevtb_dequeue
-#define _check_adjtim				__kernel_check_adjtim
-#define _tmevt_lefttim				__kernel_tmevt_lefttim
-#define _signal_time				__kernel_signal_time
-
-/*
- *  semaphore.c
- */
-#define _initialize_semaphore		__kernel_initialize_semaphore
-
-/*
- *  eventflag.c
- */
-#define _initialize_eventflag		__kernel_initialize_eventflag
-#define _check_flg_cond				__kernel_check_flg_cond
-
-/*
- *  dataqueue.c
- */
-#define _initialize_dataqueue		__kernel_initialize_dataqueue
-#define _enqueue_data				__kernel_enqueue_data
-#define _force_enqueue_data			__kernel_force_enqueue_data
-#define _dequeue_data				__kernel_dequeue_data
-#define _send_data					__kernel_send_data
-#define _force_send_data			__kernel_force_send_data
-#define _receive_data				__kernel_receive_data
-
-/*
- *  pridataq.c
- */
-#define _initialize_pridataq		__kernel_initialize_pridataq
-#define _enqueue_pridata			__kernel_enqueue_pridata
-#define _dequeue_pridata			__kernel_dequeue_pridata
-#define _send_pridata				__kernel_send_pridata
-#define _receive_pridata			__kernel_receive_pridata
-
-/*
- *  mutex.c
- */
-#define _initialize_mutex			__kernel_initialize_mutex
-#define _mutex_check_ceilpri		__kernel_mutex_check_ceilpri
-#define _mutex_scan_ceilmtx			__kernel_mutex_scan_ceilmtx
-#define _mutex_drop_priority		__kernel_mutex_drop_priority
-#define _mutex_acquire				__kernel_mutex_acquire
-#define _mutex_release				__kernel_mutex_release
-#define _mutex_release_all			__kernel_mutex_release_all
-
-/*
- *  mempfix.c
- */
-#define _initialize_mempfix			__kernel_initialize_mempfix
-#define _get_mpf_block				__kernel_get_mpf_block
-
-/*
- *  cyclic.c
- */
-#define _initialize_cyclic			__kernel_initialize_cyclic
-#define _call_cyclic				__kernel_call_cyclic
-
-/*
- *  alarm.c
- */
-#define _initialize_alarm			__kernel_initialize_alarm
-#define _call_alarm					__kernel_call_alarm
-
-/*
- *  interrupt.c
- */
-#define _initialize_interrupt		__kernel_initialize_interrupt
-
-/*
- *  exception.c
- */
-#define _initialize_exception		__kernel_initialize_exception
-
-/*
- *  kernel_cfg.c
- */
-#define _initialize_object			__kernel_initialize_object
-#define _call_inirtn				__kernel_call_inirtn
-#define _call_terrtn				__kernel_call_terrtn
-#define _tmax_tskid					__kernel_tmax_tskid
-#define _tinib_table				__kernel_tinib_table
-#define _torder_table				__kernel_torder_table
-#define _tcb_table					__kernel_tcb_table
-#define _tmax_semid					__kernel_tmax_semid
-#define _seminib_table				__kernel_seminib_table
-#define _semcb_table				__kernel_semcb_table
-#define _tmax_flgid					__kernel_tmax_flgid
-#define _flginib_table				__kernel_flginib_table
-#define _flgcb_table				__kernel_flgcb_table
-#define _tmax_dtqid					__kernel_tmax_dtqid
-#define _dtqinib_table				__kernel_dtqinib_table
-#define _dtqcb_table				__kernel_dtqcb_table
-#define _tmax_pdqid					__kernel_tmax_pdqid
-#define _pdqinib_table				__kernel_pdqinib_table
-#define _pdqcb_table				__kernel_pdqcb_table
-#define _tmax_mtxid					__kernel_tmax_mtxid
-#define _mtxinib_table				__kernel_mtxinib_table
-#define _mtxcb_table				__kernel_mtxcb_table
-#define _tmax_mpfid					__kernel_tmax_mpfid
-#define _mpfinib_table				__kernel_mpfinib_table
-#define _mpfcb_table				__kernel_mpfcb_table
-#define _tmax_cycid					__kernel_tmax_cycid
-#define _cycinib_table				__kernel_cycinib_table
-#define _cyccb_table				__kernel_cyccb_table
-#define _tmax_almid					__kernel_tmax_almid
-#define _alminib_table				__kernel_alminib_table
-#define _almcb_table				__kernel_almcb_table
-#define _tnum_def_inhno				__kernel_tnum_def_inhno
-#define _inhinib_table				__kernel_inhinib_table
-#define _tnum_cfg_intno				__kernel_tnum_cfg_intno
-#define _intinib_table				__kernel_intinib_table
-#define _tnum_def_excno				__kernel_tnum_def_excno
-#define _excinib_table				__kernel_excinib_table
-#define _tmevt_heap					__kernel_tmevt_heap
-#define _istksz						__kernel_istksz
-#define _istk						__kernel_istk
-#define _istkpt						__kernel_istkpt
-
-
-#endif /* TOPPERS_LABEL_ASM */
-
 #include "target_rename.h"
 
Index: asp3_wo_tecs/trunk/extension/pri_level/kernel/kernel_unrename.h
===================================================================
--- asp3_wo_tecs/trunk/extension/pri_level/kernel/kernel_unrename.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/pri_level/kernel/kernel_unrename.h	(revision 306)
@@ -187,190 +187,4 @@
 
 
-#ifdef TOPPERS_LABEL_ASM
-
-/*
- *  startup.c
- */
-#undef _kerflg
-#undef _exit_kernel
-
-/*
- *  task.c
- */
-#undef _p_runtsk
-#undef _p_schedtsk
-#undef _enadsp
-#undef _dspflg
-#undef _ready_queue
-#undef _ready_primap
-#undef _ready_primap1
-#undef _ready_primap2
-#undef _initialize_task
-#undef _search_schedtsk
-#undef _make_runnable
-#undef _make_non_runnable
-#undef _make_dormant
-#undef _make_active
-#undef _change_priority
-#undef _rotate_ready_queue
-#undef _task_terminate
-
-/*
- *  taskhook.c
- */
-#undef _mtxhook_check_ceilpri
-#undef _mtxhook_scan_ceilmtx
-#undef _mtxhook_release_all
-
-/*
- *  wait.c
- */
-#undef _make_wait_tmout
-#undef _wait_complete
-#undef _wait_tmout
-#undef _wait_tmout_ok
-#undef _wobj_make_wait
-#undef _wobj_make_wait_tmout
-#undef _init_wait_queue
-
-/*
- *  time_event.c
- */
-#undef _boundary_evttim
-#undef _current_evttim
-#undef _current_hrtcnt
-#undef _monotonic_evttim
-#undef _systim_offset
-#undef _in_signal_time
-#undef _initialize_tmevt
-#undef _tmevt_up
-#undef _tmevt_down
-#undef _update_current_evttim
-#undef _set_hrt_event
-#undef _tmevtb_register
-#undef _tmevtb_enqueue
-#undef _tmevtb_dequeue
-#undef _check_adjtim
-#undef _tmevt_lefttim
-#undef _signal_time
-
-/*
- *  semaphore.c
- */
-#undef _initialize_semaphore
-
-/*
- *  eventflag.c
- */
-#undef _initialize_eventflag
-#undef _check_flg_cond
-
-/*
- *  dataqueue.c
- */
-#undef _initialize_dataqueue
-#undef _enqueue_data
-#undef _force_enqueue_data
-#undef _dequeue_data
-#undef _send_data
-#undef _force_send_data
-#undef _receive_data
-
-/*
- *  pridataq.c
- */
-#undef _initialize_pridataq
-#undef _enqueue_pridata
-#undef _dequeue_pridata
-#undef _send_pridata
-#undef _receive_pridata
-
-/*
- *  mutex.c
- */
-#undef _initialize_mutex
-#undef _mutex_check_ceilpri
-#undef _mutex_scan_ceilmtx
-#undef _mutex_drop_priority
-#undef _mutex_acquire
-#undef _mutex_release
-#undef _mutex_release_all
-
-/*
- *  mempfix.c
- */
-#undef _initialize_mempfix
-#undef _get_mpf_block
-
-/*
- *  cyclic.c
- */
-#undef _initialize_cyclic
-#undef _call_cyclic
-
-/*
- *  alarm.c
- */
-#undef _initialize_alarm
-#undef _call_alarm
-
-/*
- *  interrupt.c
- */
-#undef _initialize_interrupt
-
-/*
- *  exception.c
- */
-#undef _initialize_exception
-
-/*
- *  kernel_cfg.c
- */
-#undef _initialize_object
-#undef _call_inirtn
-#undef _call_terrtn
-#undef _tmax_tskid
-#undef _tinib_table
-#undef _torder_table
-#undef _tcb_table
-#undef _tmax_semid
-#undef _seminib_table
-#undef _semcb_table
-#undef _tmax_flgid
-#undef _flginib_table
-#undef _flgcb_table
-#undef _tmax_dtqid
-#undef _dtqinib_table
-#undef _dtqcb_table
-#undef _tmax_pdqid
-#undef _pdqinib_table
-#undef _pdqcb_table
-#undef _tmax_mtxid
-#undef _mtxinib_table
-#undef _mtxcb_table
-#undef _tmax_mpfid
-#undef _mpfinib_table
-#undef _mpfcb_table
-#undef _tmax_cycid
-#undef _cycinib_table
-#undef _cyccb_table
-#undef _tmax_almid
-#undef _alminib_table
-#undef _almcb_table
-#undef _tnum_def_inhno
-#undef _inhinib_table
-#undef _tnum_cfg_intno
-#undef _intinib_table
-#undef _tnum_def_excno
-#undef _excinib_table
-#undef _tmevt_heap
-#undef _istksz
-#undef _istk
-#undef _istkpt
-
-
-#endif /* TOPPERS_LABEL_ASM */
-
 #include "target_unrename.h"
 
Index: asp3_wo_tecs/trunk/extension/pri_level/test/test_task1.h
===================================================================
--- asp3_wo_tecs/trunk/extension/pri_level/test/test_task1.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/pri_level/test/test_task1.h	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2007-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_task1.h 338 2015-06-28 09:11:10Z ertl-hiro $
+ *  $Id: test_task1.h 750 2016-05-14 14:58:16Z ertl-hiro $
  */
 
@@ -82,4 +82,13 @@
 #endif /* STACK_SIZE */
 
+#ifndef TEST_TIME_CP
+#define TEST_TIME_CP	50000U		/* ãã§ãã¯ãã¤ã³ãå°éæ
+å ±ã®åºåæé */
+#endif /* TEST_TIME_CP */
+
+#ifndef TEST_TIME_PROC
+#define TEST_TIME_PROC	1000U		/* ãã§ãã¯ãã¤ã³ããéããªãå ´åã®æé */
+#endif /* TEST_TIME_PROC */
+
 /*
  *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
Index: asp3_wo_tecs/trunk/extension/rstr_task/include/kernel.h
===================================================================
--- asp3_wo_tecs/trunk/extension/rstr_task/include/kernel.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/rstr_task/include/kernel.h	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: kernel.h 463 2015-10-18 14:25:55Z ertl-hiro $
+ *  $Id: kernel.h 654 2016-02-20 12:59:31Z ertl-hiro $
  */
 
@@ -550,6 +550,6 @@
 #define TKERNEL_MAKER	UINT_C(0x0118)	/* ã«ã¼ãã«ã®ã¡ã¼ã«ã¼ã³ã¼ã */
 #define TKERNEL_PRID	UINT_C(0x0007)	/* ã«ã¼ãã«ã®è­å¥çªå· */
-#define TKERNEL_SPVER	UINT_C(0xf630)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
-#define TKERNEL_PRVER	UINT_C(0x30b0)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_SPVER	UINT_C(0xf631)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_PRVER	UINT_C(0x3010)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
 
 /*
Index: asp3_wo_tecs/trunk/extension/rstr_task/kernel/kernel_def.csv
===================================================================
--- asp3_wo_tecs/trunk/extension/rstr_task/kernel/kernel_def.csv	(revision 302)
+++ 	(revision )
@@ -1,134 +1,0 @@
-SIL_ENDIAN_BIG,#defined(SIL_ENDIAN_BIG)
-SIL_ENDIAN_LITTLE,#defined(SIL_ENDIAN_LITTLE)
-TA_NULL,TA_NULL
-TA_ACT,TA_ACT
-TA_NOACTQUE,TA_NOACTQUE
-TA_RSTR,TA_RSTR
-TA_TPRI,TA_TPRI
-TA_WMUL,TA_WMUL
-TA_CLR,TA_CLR
-TA_CEILING,TA_CEILING
-TA_STA,TA_STA
-TA_NONKERNEL,TA_NONKERNEL
-TA_ENAINT,TA_ENAINT
-TA_EDGE,TA_EDGE
-TNFY_HANDLER,TNFY_HANDLER
-TNFY_SETVAR,TNFY_SETVAR
-TNFY_INCVAR,TNFY_INCVAR
-TNFY_ACTTSK,TNFY_ACTTSK
-TNFY_WUPTSK,TNFY_WUPTSK
-TNFY_SIGSEM,TNFY_SIGSEM
-TNFY_SETFLG,TNFY_SETFLG
-TNFY_SNDDTQ,TNFY_SNDDTQ
-TENFY_SETVAR,TENFY_SETVAR
-TENFY_INCVAR,TENFY_INCVAR
-TENFY_ACTTSK,TENFY_ACTTSK
-TENFY_WUPTSK,TENFY_WUPTSK
-TENFY_SIGSEM,TENFY_SIGSEM
-TENFY_SETFLG,TENFY_SETFLG
-TENFY_SNDDTQ,TENFY_SNDDTQ
-TMIN_TPRI,TMIN_TPRI,signed
-TMAX_TPRI,TMAX_TPRI,signed
-TMIN_DPRI,TMIN_DPRI,signed
-TMAX_DPRI,TMAX_DPRI,signed
-TMIN_ISRPRI,TMIN_ISRPRI,signed
-TMAX_ISRPRI,TMAX_ISRPRI,signed
-TBIT_FLGPTN,TBIT_FLGPTN
-TMAX_MAXSEM,TMAX_MAXSEM
-TMAX_RELTIM,TMAX_RELTIM
-TMIN_INTPRI,TMIN_INTPRI,signed
-TMAX_INTPRI,TMAX_INTPRI,signed
-TMIN_TSKID,TMIN_TSKID,signed
-TMIN_SEMID,TMIN_SEMID,signed
-TMIN_FLGID,TMIN_FLGID,signed
-TMIN_DTQID,TMIN_DTQID,signed
-TMIN_PDQID,TMIN_PDQID,signed
-TMIN_MTXID,TMIN_MTXID,signed
-TMIN_MPFID,TMIN_MPFID,signed
-TMIN_CYCID,TMIN_CYCID,signed
-TMIN_ALMID,TMIN_ALMID,signed
-OMIT_INITIALIZE_INTERRUPT,#defined(OMIT_INITIALIZE_INTERRUPT)
-USE_INHINIB_TABLE,#defined(USE_INHINIB_TABLE)
-USE_INTINIB_TABLE,#defined(USE_INTINIB_TABLE)
-OMIT_INITIALIZE_EXCEPTION,#defined(OMIT_INITIALIZE_EXCEPTION)
-USE_TSKINICTXB,#defined(USE_TSKINICTXB)
-TARGET_TSKATR,#defined(TARGET_TSKATR),,TARGET_TSKATR
-TARGET_INTATR,#defined(TARGET_INTATR),,TARGET_INTATR
-TARGET_INHATR,#defined(TARGET_INHATR),,TARGET_INHATR
-TARGET_ISRATR,#defined(TARGET_ISRATR),,TARGET_ISRATR
-TARGET_EXCATR,#defined(TARGET_EXCATR),,TARGET_EXCATR
-TARGET_MIN_STKSZ,#defined(TARGET_MIN_STKSZ),,TARGET_MIN_STKSZ
-TARGET_MIN_ISTKSZ,#defined(TARGET_MIN_ISTKSZ),,TARGET_MIN_ISTKSZ
-CHECK_STKSZ_ALIGN,#defined(CHECK_STKSZ_ALIGN),,CHECK_STKSZ_ALIGN
-CHECK_INTPTR_ALIGN,#defined(CHECK_INTPTR_ALIGN),,CHECK_INTPTR_ALIGN
-CHECK_INTPTR_NONNULL,#defined(CHECK_INTPTR_NONNULL)
-CHECK_FUNC_ALIGN,#defined(CHECK_FUNC_ALIGN),,CHECK_FUNC_ALIGN
-CHECK_FUNC_NONNULL,#defined(CHECK_FUNC_NONNULL)
-CHECK_STACK_ALIGN,#defined(CHECK_STACK_ALIGN),,CHECK_STACK_ALIGN
-CHECK_STACK_NONNULL,#defined(CHECK_STACK_NONNULL)
-CHECK_MPF_ALIGN,#defined(CHECK_MPF_ALIGN),,CHECK_MPF_ALIGN
-CHECK_MPF_NONNULL,#defined(CHECK_MPF_NONNULL)
-sizeof_void_ptr,sizeof(void*)
-sizeof_uint_t,sizeof(uint_t)
-sizeof_size_t,sizeof(size_t)
-sizeof_intptr_t,sizeof(intptr_t)
-sizeof_ID,sizeof(ID)
-sizeof_FP,sizeof(FP)
-sizeof_INHNO,sizeof(INHNO)
-sizeof_INTNO,sizeof(INTNO)
-sizeof_EXCNO,sizeof(EXCNO)
-sizeof_TINIB,sizeof(TINIB)
-offsetof_TINIB_tskatr,"offsetof(TINIB,tskatr)"
-offsetof_TINIB_exinf,"offsetof(TINIB,exinf)"
-offsetof_TINIB_task,"offsetof(TINIB,task)"
-offsetof_TINIB_ipriority,"offsetof(TINIB,ipriority)"
-offsetof_TINIB_stksz,#!defined(USE_TSKINICTXB),,"offsetof(TINIB,stksz)"
-offsetof_TINIB_stk,#!defined(USE_TSKINICTXB),,"offsetof(TINIB,stk)"
-sizeof_SEMINIB,sizeof(SEMINIB)
-offsetof_SEMINIB_sematr,"offsetof(SEMINIB,sematr)"
-offsetof_SEMINIB_isemcnt,"offsetof(SEMINIB,isemcnt)"
-offsetof_SEMINIB_maxsem,"offsetof(SEMINIB,maxsem)"
-sizeof_FLGPTN,sizeof(FLGPTN)
-sizeof_FLGINIB,sizeof(FLGINIB)
-offsetof_FLGINIB_flgatr,"offsetof(FLGINIB,flgatr)"
-offsetof_FLGINIB_iflgptn,"offsetof(FLGINIB,iflgptn)"
-sizeof_DTQINIB,sizeof(DTQINIB)
-offsetof_DTQINIB_dtqatr,"offsetof(DTQINIB,dtqatr)"
-offsetof_DTQINIB_dtqcnt,"offsetof(DTQINIB,dtqcnt)"
-offsetof_DTQINIB_p_dtqmb,"offsetof(DTQINIB,p_dtqmb)"
-sizeof_PDQINIB,sizeof(PDQINIB)
-offsetof_PDQINIB_pdqatr,"offsetof(PDQINIB,pdqatr)"
-offsetof_PDQINIB_pdqcnt,"offsetof(PDQINIB,pdqcnt)"
-offsetof_PDQINIB_maxdpri,"offsetof(PDQINIB,maxdpri)"
-offsetof_PDQINIB_p_pdqmb,"offsetof(PDQINIB,p_pdqmb)"
-sizeof_MTXINIB,sizeof(MTXINIB)
-offsetof_MTXINIB_mtxatr,"offsetof(MTXINIB,mtxatr)"
-offsetof_MTXINIB_ceilpri,"offsetof(MTXINIB,ceilpri)"
-sizeof_MPFINIB,sizeof(MPFINIB)
-offsetof_MPFINIB_mpfatr,"offsetof(MPFINIB,mpfatr)"
-offsetof_MPFINIB_blkcnt,"offsetof(MPFINIB,blkcnt)"
-offsetof_MPFINIB_blksz,"offsetof(MPFINIB,blksz)"
-offsetof_MPFINIB_mpf,"offsetof(MPFINIB,mpf)"
-offsetof_MPFINIB_p_mpfmb,"offsetof(MPFINIB,p_mpfmb)"
-sizeof_CYCINIB,sizeof(CYCINIB)
-offsetof_CYCINIB_cycatr,"offsetof(CYCINIB,cycatr)"
-offsetof_CYCINIB_exinf,"offsetof(CYCINIB,exinf)"
-offsetof_CYCINIB_nfyhdr,"offsetof(CYCINIB,nfyhdr)"
-offsetof_CYCINIB_cyctim,"offsetof(CYCINIB,cyctim)"
-offsetof_CYCINIB_cycphs,"offsetof(CYCINIB,cycphs)"
-sizeof_ALMINIB,sizeof(ALMINIB)
-offsetof_ALMINIB_almatr,"offsetof(ALMINIB,almatr)"
-offsetof_ALMINIB_exinf,"offsetof(ALMINIB,exinf)"
-offsetof_ALMINIB_nfyhdr,"offsetof(ALMINIB,nfyhdr)"
-sizeof_INHINIB,#!defined(OMIT_INITIALIZE_INTERRUPT),,sizeof(INHINIB)
-offset_INHINIB_inhno,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INHINIB,inhno)"
-offset_INHINIB_inhatr,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INHINIB,inhatr)"
-offset_INHINIB_int_entry,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INHINIB,int_entry)"
-sizeof_INTINIB,#!defined(OMIT_INITIALIZE_INTERRUPT),,sizeof(INTINIB)
-offset_INTINIB_intno,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INTINIB,intno)"
-offset_INTINIB_intatr,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INTINIB,intatr)"
-offset_INTINIB_intpri,#!defined(OMIT_INITIALIZE_INTERRUPT),,"offsetof(INTINIB,intpri)"
-sizeof_EXCINIB,#!defined(OMIT_INITIALIZE_EXCEPTION),,sizeof(EXCINIB)
-offset_EXCINIB_excno,#!defined(OMIT_INITIALIZE_EXCEPTION),,"offsetof(EXCINIB,excno)"
-offset_EXCINIB_excatr,#!defined(OMIT_INITIALIZE_EXCEPTION),,"offsetof(EXCINIB,excatr)"
-offset_EXCINIB_exc_entry,#!defined(OMIT_INITIALIZE_EXCEPTION),,"offsetof(EXCINIB,exc_entry)"
Index: asp3_wo_tecs/trunk/extension/rstr_task/kernel/kernel_sym.def
===================================================================
--- asp3_wo_tecs/trunk/extension/rstr_task/kernel/kernel_sym.def	(revision 306)
+++ asp3_wo_tecs/trunk/extension/rstr_task/kernel/kernel_sym.def	(revision 306)
@@ -0,0 +1,144 @@
+USE_EXTERNAL_ID,true,bool,defined(USE_EXTERNAL_ID)
+SIL_ENDIAN_BIG,true,bool,defined(SIL_ENDIAN_BIG)
+SIL_ENDIAN_LITTLE,true,bool,defined(SIL_ENDIAN_LITTLE)
+TA_NULL
+TA_ACT
+TA_NOACTQUE
+TA_RSTR
+TA_TPRI
+TA_WMUL
+TA_CLR
+TA_CEILING
+TA_STA
+TA_NONKERNEL
+TA_ENAINT
+TA_EDGE
+TNFY_HANDLER
+TNFY_SETVAR
+TNFY_INCVAR
+TNFY_ACTTSK
+TNFY_WUPTSK
+TNFY_SIGSEM
+TNFY_SETFLG
+TNFY_SNDDTQ
+TENFY_SETVAR
+TENFY_INCVAR
+TENFY_ACTTSK
+TENFY_WUPTSK
+TENFY_SIGSEM
+TENFY_SETFLG
+TENFY_SNDDTQ
+TMIN_TPRI,,signed
+TMAX_TPRI,,signed
+TMIN_DPRI,,signed
+TMAX_DPRI,,signed
+TMIN_ISRPRI,,signed
+TMAX_ISRPRI,,signed
+TBIT_FLGPTN
+TMAX_MAXSEM
+TMAX_RELTIM
+TMIN_INTPRI,,signed
+TMAX_INTPRI,,signed
+TMIN_TSKID,,signed
+TMIN_SEMID,,signed
+TMIN_FLGID,,signed
+TMIN_DTQID,,signed
+TMIN_PDQID,,signed
+TMIN_MTXID,,signed
+TMIN_MPFID,,signed
+TMIN_CYCID,,signed
+TMIN_ALMID,,signed
+USE_TSKINICTXB,true,bool,defined(USE_TSKINICTXB)
+OMIT_INITIALIZE_INTERRUPT,true,bool,defined(OMIT_INITIALIZE_INTERRUPT)
+USE_INHINIB_TABLE,true,bool,defined(USE_INHINIB_TABLE)
+USE_INTINIB_TABLE,true,bool,defined(USE_INTINIB_TABLE)
+OMIT_INITIALIZE_EXCEPTION,true,bool,defined(OMIT_INITIALIZE_EXCEPTION)
+DEFAULT_ISTK,,,defined(DEFAULT_ISTK)
+TARGET_TSKATR,,,defined(TARGET_TSKATR),0
+TARGET_INTATR,,,defined(TARGET_INTATR),0
+TARGET_INHATR,,,defined(TARGET_INHATR),0
+TARGET_ISRATR,,,defined(TARGET_ISRATR),0
+TARGET_EXCATR,,,defined(TARGET_EXCATR),0
+TARGET_MIN_STKSZ,,,defined(TARGET_MIN_STKSZ),1
+TARGET_MIN_ISTKSZ,,,defined(TARGET_MIN_ISTKSZ),1
+CHECK_STKSZ_ALIGN,,,defined(CHECK_STKSZ_ALIGN),1
+CHECK_INTPTR_ALIGN,,,defined(CHECK_INTPTR_ALIGN),1
+CHECK_INTPTR_NONNULL,true,bool,defined(CHECK_INTPTR_NONNULL)
+CHECK_FUNC_ALIGN,,,defined(CHECK_FUNC_ALIGN),1
+CHECK_FUNC_NONNULL,true,bool,defined(CHECK_FUNC_NONNULL)
+CHECK_STACK_ALIGN,,,defined(CHECK_STACK_ALIGN),1
+CHECK_STACK_NONNULL,true,bool,defined(CHECK_STACK_NONNULL)
+CHECK_MPF_ALIGN,,,defined(CHECK_MPF_ALIGN),1
+CHECK_MPF_NONNULL,true,bool,defined(CHECK_MPF_NONNULL)
+sizeof_void_ptr,sizeof(void*)
+sizeof_uint_t,sizeof(uint_t)
+sizeof_size_t,sizeof(size_t)
+sizeof_intptr_t,sizeof(intptr_t)
+sizeof_ID,sizeof(ID)
+sizeof_FP,sizeof(FP)
+sizeof_INTNO,sizeof(INTNO)
+sizeof_INHNO,sizeof(INHNO)
+sizeof_EXCNO,sizeof(EXCNO)
+sizeof_TASK,sizeof(TASK)
+sizeof_TMEHDR,sizeof(TMEHDR)
+sizeof_ISR,sizeof(ISR)
+sizeof_INTHDR,sizeof(INTHDR)
+sizeof_EXCHDR,sizeof(EXCHDR)
+sizeof_INIRTN,sizeof(INIRTN)
+sizeof_TERRTN,sizeof(TERRTN)
+sizeof_NFYHDR,sizeof(NFYHDR)
+sizeof_TINIB,sizeof(TINIB)
+offsetof_TINIB_tskatr,"offsetof(TINIB,tskatr)"
+offsetof_TINIB_exinf,"offsetof(TINIB,exinf)"
+offsetof_TINIB_task,"offsetof(TINIB,task)"
+offsetof_TINIB_ipriority,"offsetof(TINIB,ipriority)"
+offsetof_TINIB_stksz,"offsetof(TINIB,stksz)",,!defined(USE_TSKINICTXB)
+offsetof_TINIB_stk,"offsetof(TINIB,stk)",,!defined(USE_TSKINICTXB)
+sizeof_SEMINIB,sizeof(SEMINIB)
+offsetof_SEMINIB_sematr,"offsetof(SEMINIB,sematr)"
+offsetof_SEMINIB_isemcnt,"offsetof(SEMINIB,isemcnt)"
+offsetof_SEMINIB_maxsem,"offsetof(SEMINIB,maxsem)"
+sizeof_FLGPTN,sizeof(FLGPTN)
+sizeof_FLGINIB,sizeof(FLGINIB)
+offsetof_FLGINIB_flgatr,"offsetof(FLGINIB,flgatr)"
+offsetof_FLGINIB_iflgptn,"offsetof(FLGINIB,iflgptn)"
+sizeof_DTQINIB,sizeof(DTQINIB)
+offsetof_DTQINIB_dtqatr,"offsetof(DTQINIB,dtqatr)"
+offsetof_DTQINIB_dtqcnt,"offsetof(DTQINIB,dtqcnt)"
+offsetof_DTQINIB_p_dtqmb,"offsetof(DTQINIB,p_dtqmb)"
+sizeof_PDQINIB,sizeof(PDQINIB)
+offsetof_PDQINIB_pdqatr,"offsetof(PDQINIB,pdqatr)"
+offsetof_PDQINIB_pdqcnt,"offsetof(PDQINIB,pdqcnt)"
+offsetof_PDQINIB_maxdpri,"offsetof(PDQINIB,maxdpri)"
+offsetof_PDQINIB_p_pdqmb,"offsetof(PDQINIB,p_pdqmb)"
+sizeof_MTXINIB,sizeof(MTXINIB)
+offsetof_MTXINIB_mtxatr,"offsetof(MTXINIB,mtxatr)"
+offsetof_MTXINIB_ceilpri,"offsetof(MTXINIB,ceilpri)"
+sizeof_MPFINIB,sizeof(MPFINIB)
+offsetof_MPFINIB_mpfatr,"offsetof(MPFINIB,mpfatr)"
+offsetof_MPFINIB_blkcnt,"offsetof(MPFINIB,blkcnt)"
+offsetof_MPFINIB_blksz,"offsetof(MPFINIB,blksz)"
+offsetof_MPFINIB_mpf,"offsetof(MPFINIB,mpf)"
+offsetof_MPFINIB_p_mpfmb,"offsetof(MPFINIB,p_mpfmb)"
+sizeof_CYCINIB,sizeof(CYCINIB)
+offsetof_CYCINIB_cycatr,"offsetof(CYCINIB,cycatr)"
+offsetof_CYCINIB_exinf,"offsetof(CYCINIB,exinf)"
+offsetof_CYCINIB_nfyhdr,"offsetof(CYCINIB,nfyhdr)"
+offsetof_CYCINIB_cyctim,"offsetof(CYCINIB,cyctim)"
+offsetof_CYCINIB_cycphs,"offsetof(CYCINIB,cycphs)"
+sizeof_ALMINIB,sizeof(ALMINIB)
+offsetof_ALMINIB_almatr,"offsetof(ALMINIB,almatr)"
+offsetof_ALMINIB_exinf,"offsetof(ALMINIB,exinf)"
+offsetof_ALMINIB_nfyhdr,"offsetof(ALMINIB,nfyhdr)"
+sizeof_INHINIB,sizeof(INHINIB),,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INHINIB_inhno,"offsetof(INHINIB,inhno)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INHINIB_inhatr,"offsetof(INHINIB,inhatr)",,!defined(OMIT_INITIALIZE_INTERRUPT),,
+offset_INHINIB_int_entry,"offsetof(INHINIB,int_entry)",,!defined(OMIT_INITIALIZE_INTERRUPT),,
+sizeof_INTINIB,sizeof(INTINIB),,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INTINIB_intno,"offsetof(INTINIB,intno)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INTINIB_intatr,"offsetof(INTINIB,intatr)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+offset_INTINIB_intpri,"offsetof(INTINIB,intpri)",,!defined(OMIT_INITIALIZE_INTERRUPT)
+sizeof_EXCINIB,sizeof(EXCINIB),,!defined(OMIT_INITIALIZE_EXCEPTION)
+offset_EXCINIB_excno,"offsetof(EXCINIB,excno)",,!defined(OMIT_INITIALIZE_EXCEPTION)
+offset_EXCINIB_excatr,"offsetof(EXCINIB,excatr)",,!defined(OMIT_INITIALIZE_EXCEPTION)
+offset_EXCINIB_exc_entry,"offsetof(EXCINIB,exc_entry)",,!defined(OMIT_INITIALIZE_EXCEPTION)
Index: asp3_wo_tecs/trunk/extension/rstr_task/kernel/sys_manage.c
===================================================================
--- asp3_wo_tecs/trunk/extension/rstr_task/kernel/sys_manage.c	(revision 302)
+++ asp3_wo_tecs/trunk/extension/rstr_task/kernel/sys_manage.c	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: sys_manage.c 470 2015-12-30 09:50:36Z ertl-hiro $
+ *  $Id: sys_manage.c 684 2016-03-11 15:24:12Z ertl-hiro $
  */
 
@@ -174,5 +174,5 @@
 /*
  *  ã¿ã¹ã¯ã®åªå
-é ä½ã®åè»¢
+é ä½ã®åè»¢ï¼»NGKI3548ï¼½
  */
 #ifdef TOPPERS_rot_rdq
@@ -186,10 +186,10 @@
 
 	LOG_ROT_RDQ_ENTER(tskpri);
-	CHECK_UNL();
+	CHECK_UNL();								/*ï¼»NGKI2684ï¼½*/
 	if (tskpri == TPRI_SELF && !sense_context()) {
-		pri = p_runtsk->bpriority;
+		pri = p_runtsk->bpriority;				/*ï¼»NGKI2689ï¼½*/
 	}
 	else {
-		CHECK_PAR(VALID_TPRI(tskpri));
+		CHECK_PAR(VALID_TPRI(tskpri));			/*ï¼»NGKI2685ï¼½*/
 		pri = INT_PRIORITY(tskpri);
 	}
@@ -227,5 +227,5 @@
  *  å®è¡ç¶æ
 ã®ã¿ã¹ã¯IDã®åç
-§
+§ï¼»NGKI3550ï¼½
  */
 #ifdef TOPPERS_get_tid
@@ -237,5 +237,5 @@
 
 	LOG_GET_TID_ENTER(p_tskid);
-	CHECK_UNL();
+	CHECK_UNL();								/*ï¼»NGKI2707ï¼½*/
 
 	lock_cpu();
@@ -253,5 +253,5 @@
 /*
  *  å®è¡ã§ããã¿ã¹ã¯ã®æ°ã®åç
-§
+§ï¼»NGKI3623ï¼½
  */
 #ifdef TOPPERS_get_lod
@@ -265,10 +265,10 @@
 
 	LOG_GET_LOD_ENTER(p_tskid, p_load);
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI3624ï¼½ï¼»NGKI3625ï¼½*/
 	if (tskpri == TPRI_SELF) {
-		pri = p_runtsk->bpriority;
+		pri = p_runtsk->bpriority;				/*ï¼»NGKI3631ï¼½*/
 	}
 	else {
-		CHECK_PAR(VALID_TPRI(tskpri));
+		CHECK_PAR(VALID_TPRI(tskpri));			/*ï¼»NGKI3626ï¼½*/
 		pri = INT_PRIORITY(tskpri);
 	}
@@ -295,5 +295,5 @@
  *  æå®ããåªå
 é ä½ã®ã¿ã¹ã¯IDã®åç
-§
+§ï¼»NGKI3641ï¼½
  */
 #ifdef TOPPERS_get_nth
@@ -308,10 +308,10 @@
 
 	LOG_GET_NTH_ENTER(p_tskid, nth, p_tskid);
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI3642ï¼½ï¼»NGKI3643ï¼½*/
 	if (tskpri == TPRI_SELF) {
-		pri = p_runtsk->bpriority;
+		pri = p_runtsk->bpriority;				/*ï¼»NGKI3650ï¼½*/
 	}
 	else {
-		CHECK_PAR(VALID_TPRI(tskpri));
+		CHECK_PAR(VALID_TPRI(tskpri));			/*ï¼»NGKI3644ï¼½*/
 		pri = INT_PRIORITY(tskpri);
 	}
@@ -341,5 +341,5 @@
 /*
  *  CPUã­ãã¯ç¶æ
-ã¸ã®é·ç§»
+ã¸ã®é·ç§»ï¼»NGKI3538ï¼½
  */
 #ifdef TOPPERS_loc_cpu
@@ -352,6 +352,6 @@
 	LOG_LOC_CPU_ENTER();
 
-	if (!sense_lock()) {
-		lock_cpu();
+	if (!sense_lock()) {						/*ï¼»NGKI2731ï¼½*/
+		lock_cpu();								/*ï¼»NGKI2730ï¼½*/
 	}
 	ercd = E_OK;
@@ -365,5 +365,5 @@
 /*
  *  CPUã­ãã¯ç¶æ
-ã®è§£é¤
+ã®è§£é¤ï¼»NGKI3539ï¼½
  *
  *  CPUã­ãã¯ä¸­ã¯ï¼ãã£ã¹ããããå¿
@@ -383,6 +383,6 @@
 	LOG_UNL_CPU_ENTER();
 
-	if (sense_lock()) {
-		unlock_cpu();
+	if (sense_lock()) {							/*ï¼»NGKI2738ï¼½*/
+		unlock_cpu();							/*ï¼»NGKI2737ï¼½*/
 	}
 	ercd = E_OK;
@@ -395,5 +395,5 @@
 
 /*
- *  ãã£ã¹ãããã®ç¦æ­¢
+ *  ãã£ã¹ãããã®ç¦æ­¢ï¼»NGKI2740ï¼½
  */
 #ifdef TOPPERS_dis_dsp
@@ -405,5 +405,5 @@
 
 	LOG_DIS_DSP_ENTER();
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI2741ï¼½ï¼»NGKI2742ï¼½*/
 
 	lock_cpu();
@@ -421,5 +421,5 @@
 
 /*
- *  ãã£ã¹ãããã®è¨±å¯
+ *  ãã£ã¹ãããã®è¨±å¯ï¼»NGKI2746ï¼½
  */
 #ifdef TOPPERS_ena_dsp
@@ -431,5 +431,5 @@
 
 	LOG_ENA_DSP_ENTER();
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI2747ï¼½ï¼»NGKI2748ï¼½*/
 
 	lock_cpu();
@@ -464,5 +464,5 @@
 /*
  *  ã³ã³ãã­ã¹ãã®åç
-§
+§ï¼»NGKI2752ï¼½
  */
 #ifdef TOPPERS_sns_ctx
@@ -484,5 +484,5 @@
  *  CPUã­ãã¯ç¶æ
 ã®åç
-§
+§ï¼»NGKI2754ï¼½
  */
 #ifdef TOPPERS_sns_loc
@@ -504,5 +504,5 @@
  *  ãã£ã¹ãããç¦æ­¢ç¶æ
 ã®åç
-§
+§ï¼»NGKI2756ï¼½
  */
 #ifdef TOPPERS_sns_dsp
@@ -524,5 +524,5 @@
  *  ãã£ã¹ãããä¿çç¶æ
 ã®åç
-§
+§ï¼»NGKI2758ï¼½
  */
 #ifdef TOPPERS_sns_dpn
@@ -544,5 +544,5 @@
  *  ã«ã¼ãã«éåä½ç¶æ
 ã®åç
-§
+§ï¼»NGKI2760ï¼½
  */
 #ifdef TOPPERS_sns_ker
Index: asp3_wo_tecs/trunk/extension/rstr_task/kernel/task.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/rstr_task/kernel/task.tf	(revision 302)
+++ 	(revision )
@@ -1,232 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: task.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_TSKID	$LENGTH(TSK.ID_LIST)$$NL$
-$FOREACH id TSK.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Task Management Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  ã¿ã¹ã¯ã®IDçªå·ãä¿æããå¤æ°
-$
-$IF USE_EXTERNAL_ID$
-	$FOREACH id TSK.ID_LIST$
-		const ID $id$_id = $+id$;$NL$
-	$END$$NL$
-$END$
-
-$
-$  ã¿ã¹ã¯ã1ã¤ãç»é²ããã¦ããªãå ´åï¼»NGKI0033ï¼½
-$
-$IF !LENGTH(TSK.ID_LIST)$
-	$ERROR$$FORMAT(_("no task is registered"))$$END$
-$END$
-
-$
-$  ã¿ã¹ã¯IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_tskid = (TMIN_TSKID + TNUM_TSKID - 1);$NL$
-$NL$
-
-$
-$  ã¨ã©ã¼ãã§ãã¯
-$
-$FOREACH tskid TSK.ID_LIST$
-$	// tskatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1028ï¼½
-$	//ï¼TA_ACTï¼TA_NOACTQUEï¼TA_RSTRï¼TARGET_TSKATRä»¥å¤ã®ããããã»ãã
-$	// ããã¦ããå ´åï¼
-	$IF (TSK.TSKATR[tskid] & ~(TA_ACT|TA_NOACTQUE|TA_RSTR|TARGET_TSKATR)) != 0$
-		$ERROR TSK.TEXT_LINE[tskid]$E_RSATR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-						"tskatr", TSK.TSKATR[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-
-$	// (TMIN_TPRI <= itskpri && itskpri <= TMAX_TPRI)ã§ãªãå ´åï¼»NGKI1034ï¼½
-	$IF !(TMIN_TPRI <= TSK.ITSKPRI[tskid] && TSK.ITSKPRI[tskid] <= TMAX_TPRI)$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-						"itskpri", TSK.ITSKPRI[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-$END$
-
-$
-$  ã¹ã¿ãã¯é åã«é¢ããã¨ã©ã¼ãã§ãã¯
-$
-$FOREACH tskid TSK.ID_LIST$
-$	// stkszã0ä»¥ä¸ãï¼ã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_STKSZï¼ããã
-$	// å°ããå ´åï¼»NGKI1042ï¼½
-	$IF TSK.STKSZ[tskid] <= 0 || (TARGET_MIN_STKSZ
-									&& TSK.STKSZ[tskid] < TARGET_MIN_STKSZ)$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("too small %1% `%2%\' of `%3%\' in %4%"),
-						"stksz", TSK.STKSZ[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-
-$ 	// stkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´åï¼»NGKI1056ï¼½
-	$IF !EQ(TSK.STK[tskid], "NULL") && CHECK_STKSZ_ALIGN
-							&& (TSK.STKSZ[tskid] & (CHECK_STKSZ_ALIGN - 1))$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-						"stksz", TSK.STKSZ[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-$END$
-
-$
-$  ã¹ã¿ãã¯é åã®çæ
-$
-$FOREACH tskid TSK.ID_LIST$
-$	// ã¹ã¿ãã¯é åã®è¨­å®ï¼»NGKI1041ï¼½
-	$IF EQ(TSK.STK[tskid],"NULL")$
-		$IF (TSK.TSKATR[tskid] & TA_RSTR) == 0$
-$			// ã¹ã¿ãã¯é åã®çæï¼»NGKI1049ï¼½
-$			// å¤§ããæ¹ã«ä¸¸ãããµã¤ãºã§ç¢ºä¿ããï¼»NGKI1050ï¼½
-			$TSK.TINIB_STKSZ[tskid] = ALLOC_STACK(CONCAT("_kernel_stack_",
-													tskid), TSK.STKSZ[tskid])$
-			$TSK.TINIB_STK[tskid] = CONCAT("_kernel_stack_", tskid)$
-		$ELSE$
-$			// å¶ç´ã¿ã¹ã¯ã®ã¹ã¿ãã¯é åã®è¨­å®ï¼»NGKI1052ï¼½
-			$TSK.TINIB_STKSZ[tskid] = FORMAT("ROUND_STK_T(%1%)",
-														TSK.STKSZ[tskid])$
-			$TSK.TINIB_STK[tskid] = CONCAT("_kernel_shared_stack_",
-														+TSK.ITSKPRI[tskid])$
-$			// å¶ç´ã¿ã¹ã¯ç¨ã®å
-±æã¹ã¿ãã¯ã®ãµã¤ãºãæ±ããï¼»NGKI1053ï¼½
-			$IF !LENGTH(shared_stack_size[TSK.ITSKPRI[tskid]])
-					|| shared_stack_size[TSK.ITSKPRI[tskid]] < TSK.STKSZ[tskid]$
-				$shared_stack_size[TSK.ITSKPRI[tskid]] = TSK.STKSZ[tskid]$
-			$END$
-		$END$
-
-	$ELSE$
-		$TSK.TINIB_STKSZ[tskid] = FORMAT("(%1%)", TSK.STKSZ[tskid])$
-		$TSK.TINIB_STK[tskid] = FORMAT("(void *)(%1%)", TSK.STK[tskid])$
-	$END$
-$END$
-$ å¶ç´ã¿ã¹ã¯ç¨ã®å
-±æã¹ã¿ãã¯é åã®çæï¼»NGKI1052ï¼½ï¼»NGKI1053ï¼½
-$FOREACH tskpri RANGE(TMIN_TPRI, TMAX_TPRI)$
-	$IF LENGTH(shared_stack_size[tskpri])$
-		$RESULT = ALLOC_STACK(CONCAT("_kernel_shared_stack_", tskpri),
-											shared_stack_size[tskpri])$
-	$END$
-$END$
-$NL$
-
-$
-$  ã¿ã¹ã¯åæåãã­ãã¯ã®çæï¼ã¿ã¹ã¯ã¯1åä»¥ä¸å­å¨ããï¼
-$
-const TINIB _kernel_tinib_table[TNUM_TSKID] = {$NL$
-$JOINEACH tskid TSK.ID_LIST ",\n"$
-	$TAB${$SPC$
-$		// ã¿ã¹ã¯å±æ§ï¼æ¡å¼µæ
-å ±ï¼èµ·åçªå°ï¼èµ·åæåªå
-åº¦
-		($TSK.TSKATR[tskid]$),$SPC$
-		(intptr_t)($TSK.EXINF[tskid]$),$SPC$
-		(TASK)($TSK.TASK[tskid]$),$SPC$
-		INT_PRIORITY($TSK.ITSKPRI[tskid]$),$SPC$
-
-$		// ã¿ã¹ã¯åæåã³ã³ãã­ã¹ããã­ãã¯ï¼ã¹ã¿ãã¯é å
-		$IF USE_TSKINICTXB$
-			$GENERATE_TSKINICTXB(tskid)$
-		$ELSE$
-			$TSK.TINIB_STKSZ[tskid]$, $TSK.TINIB_STK[tskid]$
-		$END$$SPC$
-	}$END$$NL$
-};$NL$
-$NL$
-
-$
-$  ã¿ã¹ã¯çæé åºãã¼ãã«ã®çæ
-$
-const ID _kernel_torder_table[TNUM_TSKID] = {$NL$
-$TAB$$JOINEACH tskid TSK.ORDER_LIST ", "$$tskid$$END$$NL$
-};$NL$
-$NL$
-
-$
-$  ã¿ã¹ã¯ç®¡çãã­ãã¯ã®çæ
-$
-TCB _kernel_tcb_table[TNUM_TSKID];$NL$
-$NL$
-
-$
-$  ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«åæåé¢æ°
-$
-$initfuncs = "_kernel_initialize_task();"$
Index: asp3_wo_tecs/trunk/extension/rstr_task/kernel/task.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/rstr_task/kernel/task.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/rstr_task/kernel/task.trb	(revision 306)
@@ -0,0 +1,163 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: task.trb 749 2016-05-14 14:47:45Z ertl-hiro $
+# 
+
+#
+#		ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«ã®çæã¹ã¯ãªãã
+#
+
+class TaskObject < KernelObject
+  def initialize()
+    @sharedStackSize = {}
+    super("tsk", "task", "t")
+  end
+
+  def prepare(key, params)
+    # ãã©ã¡ã¼ã¿ãçç¥ãããæã®ããã©ã«ãå¤ã®è¨­å®
+    params[:stk] ||= "NULL"
+
+    # tskatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1028ï¼½
+    #ï¼TA_ACTï¼TA_NOACTQUEï¼TA_RSTRï¼TARGET_TSKATRä»¥å¤ã®ããããã»ãã
+    # ããã¦ããå ´åï¼
+    if (params[:tskatr] & ~($TA_ACT|$TA_NOACTQUE|$TA_RSTR|$TARGET_TSKATR)) != 0
+      error_illegal_id("E_RSATR", params, :tskatr, :tskid)
+    end
+
+    # (TMIN_TPRI <= itskpri && itskpri <= TMAX_TPRI)ã§ãªãå ´åï¼»NGKI1034ï¼½
+    if !($TMIN_TPRI <= params[:itskpri] && params[:itskpri] <= $TMAX_TPRI)
+      error_illegal_id("E_PAR", params, :itskpri, :tskid)
+    end
+
+    # stkszãã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_STKSZï¼æªå®ç¾©ã®å ´åã¯1ï¼
+    # ãããå°ããå ´åï¼»NGKI1042ï¼½
+    if params[:stksz] < $TARGET_MIN_STKSZ
+      error_wrong_id("E_PAR", params, :stksz, :tskid, "too small")
+    end
+
+    # ã¹ã¿ãã¯é åã®è¨­å®ï¼»NGKI1041ï¼½
+    if params[:stk] == "NULL"
+      if (params[:tskatr] & $TA_RSTR) == 0
+        # ã¹ã¿ãã¯é åã®çæï¼»NGKI1049ï¼½
+        stkName = "_kernel_stack_#{params[:tskid]}"
+        params[:tinib_stksz] = AllocStack(stkName, params[:stksz])
+        params[:tinib_stk] = stkName
+      else
+        itskpriVal = params[:itskpri].val
+
+        # å¶ç´ã¿ã¹ã¯ã®ã¹ã¿ãã¯é åã®è¨­å®ï¼»NGKI1052ï¼½
+        params[:tinib_stksz] = "ROUND_STK_T(#{params[:stksz]})"
+        params[:tinib_stk] = "_kernel_shared_stack_#{itskpriVal}"
+
+        # å¶ç´ã¿ã¹ã¯ç¨ã®å
+±æã¹ã¿ãã¯ã®ãµã¤ãºãæ±ããï¼»NGKI1053ï¼½
+        if !@sharedStackSize.has_key?(itskpriVal) \
+					|| @sharedStackSize[itskpriVal] < params[:stksz]
+          @sharedStackSize[itskpriVal] = params[:stksz]
+        end
+      end
+    else
+      # stkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´åï¼»NGKI1056ï¼½
+      if (params[:stksz] & ($CHECK_STKSZ_ALIGN - 1)) != 0
+        error_wrong_id("E_PAR", params, :stksz, :tskid, "not aligned")
+      end
+
+      params[:tinib_stksz] = params[:stksz]
+      params[:tinib_stk] = "(void *)(#{params[:stk]})"
+    end
+  end
+
+  def generateData
+    # å¶ç´ã¿ã¹ã¯ç¨ã®å
+±æã¹ã¿ãã¯é åã®çæï¼»NGKI1052ï¼½
+    $TMIN_TPRI.upto($TMAX_TPRI).each do |itskpriVal|
+      if @sharedStackSize.has_key?(itskpriVal)
+        AllocStack("_kernel_shared_stack_#{itskpriVal}", \
+										@sharedStackSize[itskpriVal])
+      end
+    end
+  end
+
+  def generateInib(key, params)
+    if $USE_TSKINICTXB
+      tskinictxb = GenerateTskinictxb(key, params)
+    else
+      tskinictxb = "#{params[:tinib_stksz]}, #{params[:tinib_stk]}"
+    end
+    return("(#{params[:tskatr]}), (intptr_t)(#{params[:exinf]}), " \
+			"(TASK)(#{params[:task]}), INT_PRIORITY(#{params[:itskpri]}), " \
+			+ tskinictxb)
+  end
+end
+
+#
+#  ã¿ã¹ã¯ç®¡çã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Task Management Functions")
+if $cfgData[:CRE_TSK].size() == 0
+  error("no task is registered")
+end
+TaskObject.new.generate()
+
+# ã¿ã¹ã¯çæé åºãã¼ãã«ã®çæ
+$kernelCfgC.add("const ID _kernel_torder_table[TNUM_TSKID] = { ")
+$kernelCfgC.append("\t")
+$cfgData[:CRE_TSK].each_with_index do |(key, params), index|
+  $kernelCfgC.append(", ") if index > 0
+  $kernelCfgC.append("#{params[:tskid]}")
+end
+$kernelCfgC.add
+$kernelCfgC.add2("};")
Index: asp3_wo_tecs/trunk/extension/rstr_task/test/test_rstr1.c
===================================================================
--- asp3_wo_tecs/trunk/extension/rstr_task/test/test_rstr1.c	(revision 302)
+++ asp3_wo_tecs/trunk/extension/rstr_task/test/test_rstr1.c	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2010-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2010-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_rstr1.c 310 2015-02-08 13:46:46Z ertl-hiro $
+ *  $Id: test_rstr1.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -115,10 +115,10 @@
 åº¦ï¼é«ï¼==
  *	2:	slp_tsk() -> E_NOSPT						... (A-1)
- *		tslp_tsk(10000U) -> E_NOSPT					... (A-2)
- *		dly_tsk(10000U) -> E_NOSPT					... (A-3)
+ *		tslp_tsk(TEST_TIME_PROC) -> E_NOSPT			... (A-2)
+ *		dly_tsk(TEST_TIME_PROC) -> E_NOSPT			... (A-3)
  *		wai_sem(SEM1) -> E_NOSPT					... (A-4)
  *		pol_sem(SEM1)								... (A-5)
  *		pol_sem(SEM1) -> E_TMOUT
- *		twai_sem(SEM1, 10000U) -> E_NOSPT			... (A-6)
+ *		twai_sem(SEM1, TEST_TIME_PROC) -> E_NOSPT	... (A-6)
  *  	ext_tsk()
  *	== TASK1ï¼ç¶ãï¼==
@@ -129,5 +129,5 @@
  *		sus_tsk(TASK3) -> E_NOSPT					... (B-7)
  *		rsm_tsk(TASK3) -> E_NOSPT					... (B-8)
- *		sta_alm(ALM1, 10000U)
+ *		sta_alm(ALM1, TEST_TIME_PROC) ... ALM1ãå®è¡éå§ããã¾ã§
  *		slp_tsk()
  *	== ALM1 ==
@@ -240,5 +240,5 @@
 	check_ercd(ercd, E_NOSPT);
 
-	ercd = sta_alm(ALM1, 10000U);
+	ercd = sta_alm(ALM1, TEST_TIME_PROC);
 	check_ercd(ercd, E_OK);
 
@@ -273,8 +273,8 @@
 		check_ercd(ercd, E_NOSPT);
 
-		ercd = tslp_tsk(10000U);
-		check_ercd(ercd, E_NOSPT);
-
-		ercd = dly_tsk(10000U);
+		ercd = tslp_tsk(TEST_TIME_PROC);
+		check_ercd(ercd, E_NOSPT);
+
+		ercd = dly_tsk(TEST_TIME_PROC);
 		check_ercd(ercd, E_NOSPT);
 
@@ -288,5 +288,5 @@
 		check_ercd(ercd, E_TMOUT);
 
-		ercd = twai_sem(SEM1, 10000U);
+		ercd = twai_sem(SEM1, TEST_TIME_PROC);
 		check_ercd(ercd, E_NOSPT);
 
Index: asp3_wo_tecs/trunk/extension/rstr_task/test/test_rstr1.cfg
===================================================================
--- asp3_wo_tecs/trunk/extension/rstr_task/test/test_rstr1.cfg	(revision 302)
+++ asp3_wo_tecs/trunk/extension/rstr_task/test/test_rstr1.cfg	(revision 306)
@@ -2,10 +2,7 @@
  *		å¶ç´ã¿ã¹ã¯ã®ãã¹ã(1)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
  *
- *  $Id: test_rstr1.cfg 327 2015-06-21 06:42:01Z ertl-hiro $
+ *  $Id: test_rstr1.cfg 572 2016-02-01 14:40:09Z ertl-hiro $
  */
-INCLUDE("target_timer.cfg");
-INCLUDE("syssvc/syslog.cfg");
-INCLUDE("syssvc/banner.cfg");
-INCLUDE("syssvc/serial.cfg");
+INCLUDE("tecsgen.cfg");
 
 #include "test_rstr1.h"
Index: asp3_wo_tecs/trunk/extension/rstr_task/test/test_rstr1.h
===================================================================
--- asp3_wo_tecs/trunk/extension/rstr_task/test/test_rstr1.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/rstr_task/test/test_rstr1.h	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2010 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2010-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_rstr1.h 2 2014-01-11 03:50:35Z ertl-hiro $
+ *  $Id: test_rstr1.h 737 2016-04-05 13:11:23Z ertl-hiro $
  */
 
@@ -80,4 +80,13 @@
 #endif /* STACK_SIZE */
 
+#ifndef TEST_TIME_CP
+#define TEST_TIME_CP	50000U		/* ãã§ãã¯ãã¤ã³ãå°éæ
+å ±ã®åºåæé */
+#endif /* TEST_TIME_CP */
+
+#ifndef TEST_TIME_PROC
+#define TEST_TIME_PROC	1000U		/* ãã§ãã¯ãã¤ã³ããéããªãå ´åã®æé */
+#endif /* TEST_TIME_PROC */
+
 /*
  *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
Index: asp3_wo_tecs/trunk/extension/rstr_task/test/test_rstr2.cfg
===================================================================
--- asp3_wo_tecs/trunk/extension/rstr_task/test/test_rstr2.cfg	(revision 302)
+++ asp3_wo_tecs/trunk/extension/rstr_task/test/test_rstr2.cfg	(revision 306)
@@ -2,10 +2,7 @@
  *		å¶ç´ã¿ã¹ã¯ã®ãã¹ã(2)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
  *
- *  $Id: test_rstr2.cfg 242 2014-09-30 17:31:16Z ertl-hiro $
+ *  $Id: test_rstr2.cfg 572 2016-02-01 14:40:09Z ertl-hiro $
  */
-INCLUDE("target_timer.cfg");
-INCLUDE("syssvc/syslog.cfg");
-INCLUDE("syssvc/banner.cfg");
-INCLUDE("syssvc/serial.cfg");
+INCLUDE("tecsgen.cfg");
 
 #include "test_rstr2.h"
Index: asp3_wo_tecs/trunk/extension/subprio/include/kernel.h
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/include/kernel.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/subprio/include/kernel.h	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: kernel.h 463 2015-10-18 14:25:55Z ertl-hiro $
+ *  $Id: kernel.h 654 2016-02-20 12:59:31Z ertl-hiro $
  */
 
@@ -553,6 +553,6 @@
 #define TKERNEL_MAKER	UINT_C(0x0118)	/* ã«ã¼ãã«ã®ã¡ã¼ã«ã¼ã³ã¼ã */
 #define TKERNEL_PRID	UINT_C(0x0007)	/* ã«ã¼ãã«ã®è­å¥çªå· */
-#define TKERNEL_SPVER	UINT_C(0xf630)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
-#define TKERNEL_PRVER	UINT_C(0x30b0)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_SPVER	UINT_C(0xf631)	/* ã«ã¼ãã«ä»æ§ã®ãã¼ã¸ã§ã³çªå· */
+#define TKERNEL_PRVER	UINT_C(0x3010)	/* ã«ã¼ãã«ã®ãã¼ã¸ã§ã³çªå· */
 
 /*
Index: asp3_wo_tecs/trunk/extension/subprio/kernel/Makefile.kernel
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/kernel/Makefile.kernel	(revision 302)
+++ asp3_wo_tecs/trunk/extension/subprio/kernel/Makefile.kernel	(revision 306)
@@ -6,5 +6,5 @@
 #  Copyright (C) 2003 by Embedded and Real-Time Systems Laboratory
 #                              Toyohashi Univ. of Technology, JAPAN
-#  Copyright (C) 2005-2014 by Embedded and Real-Time Systems Laboratory
+#  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
 #              Graduate School of Information Science, Nagoya Univ., JAPAN
 # 
@@ -53,5 +53,5 @@
 #  ã®è²¬ä»»ãè² ããªãï¼
 # 
-#  $Id: Makefile.kernel 271 2014-10-16 09:42:02Z ertl-hiro $
+#  $Id: Makefile.kernel 554 2016-01-17 13:21:59Z ertl-hiro $
 # 
 
@@ -133,23 +133,23 @@
 #  çæããããªãã¸ã§ã¯ããã¡ã¤ã«ã®ä¾å­é¢ä¿ã®å®ç¾©
 #
-$(startup) $(startup:.o=.s) $(startup:.o=.d): startup.c
-$(task) $(task:.o=.s) $(task:.o=.d): task.c
-$(taskhook) $(taskhook:.o=.s) $(taskhook:.o=.d): taskhook.c
-$(wait) $(wait:.o=.s) $(wait:.o=.d): wait.c
-$(time_event) $(time_event:.o=.s) $(time_event:.o=.d): time_event.c
-$(task_manage) $(task_manage:.o=.s) $(task_manage:.o=.d): task_manage.c
-$(task_refer) $(task_refer:.o=.s) $(task_refer:.o=.d): task_refer.c
-$(task_sync) $(task_sync:.o=.s) $(task_sync:.o=.d): task_sync.c
-$(task_term) $(task_term:.o=.s) $(task_term:.o=.d): task_term.c
-$(semaphore) $(semaphore:.o=.s) $(semaphore:.o=.d): semaphore.c
-$(eventflag) $(eventflag:.o=.s) $(eventflag:.o=.d): eventflag.c
-$(dataqueue) $(dataqueue:.o=.s) $(dataqueue:.o=.d): dataqueue.c
-$(pridataq) $(pridataq:.o=.s) $(pridataq:.o=.d): pridataq.c
-$(mutex) $(mutex:.o=.s) $(mutex:.o=.d): mutex.c
-$(mempfix) $(mempfix:.o=.s) $(mempfix:.o=.d): mempfix.c
-$(time_manage) $(time_manage:.o=.s) $(time_manage:.o=.d): time_manage.c
-$(cyclic) $(cyclic:.o=.s) $(cyclic:.o=.d): cyclic.c
-$(alarm) $(alarm:.o=.s) $(alarm:.o=.d): alarm.c
-$(sys_manage) $(sys_manage:.o=.s) $(sys_manage:.o=.d): sys_manage.c
-$(interrupt) $(interrupt:.o=.s) $(interrupt:.o=.d): interrupt.c
-$(exception) $(exception:.o=.s) $(exception:.o=.d): exception.c
+$(startup) $(startup:.o=.s): startup.c
+$(task) $(task:.o=.s): task.c
+$(taskhook) $(taskhook:.o=.s): taskhook.c
+$(wait) $(wait:.o=.s): wait.c
+$(time_event) $(time_event:.o=.s): time_event.c
+$(task_manage) $(task_manage:.o=.s): task_manage.c
+$(task_refer) $(task_refer:.o=.s): task_refer.c
+$(task_sync) $(task_sync:.o=.s): task_sync.c
+$(task_term) $(task_term:.o=.s): task_term.c
+$(semaphore) $(semaphore:.o=.s): semaphore.c
+$(eventflag) $(eventflag:.o=.s): eventflag.c
+$(dataqueue) $(dataqueue:.o=.s): dataqueue.c
+$(pridataq) $(pridataq:.o=.s): pridataq.c
+$(mutex) $(mutex:.o=.s): mutex.c
+$(mempfix) $(mempfix:.o=.s): mempfix.c
+$(time_manage) $(time_manage:.o=.s): time_manage.c
+$(cyclic) $(cyclic:.o=.s): cyclic.c
+$(alarm) $(alarm:.o=.s): alarm.c
+$(sys_manage) $(sys_manage:.o=.s): sys_manage.c
+$(interrupt) $(interrupt:.o=.s): interrupt.c
+$(exception) $(exception:.o=.s): exception.c
Index: asp3_wo_tecs/trunk/extension/subprio/kernel/kernel_api.csv
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/kernel/kernel_api.csv	(revision 302)
+++ 	(revision )
@@ -1,17 +1,0 @@
-tsk,CRE_TSK,#tskid { .tskatr &exinf &task +itskpri .stksz &stk },,
-sem,CRE_SEM,#semid { .sematr .isemcnt .maxsem },,
-flg,CRE_FLG,#flgid { .flgatr .iflgptn },,
-dtq,CRE_DTQ,#dtqid { .dtqatr .dtqcnt &dtqmb },,
-pdq,CRE_PDQ,#pdqid { .pdqatr .pdqcnt +maxdpri &pdqmb },,
-mtx,CRE_MTX,#mtxid { .mtxatr +ceilpri? },,
-mpf,CRE_MPF,#mpfid { .mpfatr .blkcnt .blksz &mpf &mpfmb },,
-cyc,CRE_CYC,#cycid { .cycatr { .nfymode &par1 &par2? &par3? &par4? } .cyctim .cycphs },,
-alm,CRE_ALM,#almid { .almatr { .nfymode &par1 &par2? &par3? &par4? } },,
-spr,ENA_SPR,.tskpri,-1,
-int,CFG_INT,.intno { .intatr +intpri },,
-isr,CRE_ISR,#isrid { .isratr &exinf .intno &isr +isrpri },,
-inh,DEF_INH,.inhno { .inhatr &inthdr },,
-exc,DEF_EXC,.excno { .excatr &exchdr },,
-ics,DEF_ICS,{ .istksz &istk },-1,
-ini,ATT_INI,{ .iniatr &exinf &inirtn },-1,
-ter,ATT_TER,{ .teratr &exinf &terrtn },-1,
Index: asp3_wo_tecs/trunk/extension/subprio/kernel/kernel_api.def
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/kernel/kernel_api.def	(revision 306)
+++ asp3_wo_tecs/trunk/extension/subprio/kernel/kernel_api.def	(revision 306)
@@ -0,0 +1,17 @@
+CRE_TSK #tskid* { .tskatr &exinf &task +itskpri .stksz &stk? }
+CRE_SEM #semid* { .sematr .isemcnt .maxsem }
+CRE_FLG #flgid* { .flgatr .iflgptn }
+CRE_DTQ #dtqid* { .dtqatr .dtqcnt &dtqmb? }
+CRE_PDQ #pdqid* { .pdqatr .pdqcnt +maxdpri &pdqmb? }
+CRE_MTX #mtxid* { .mtxatr +ceilpri? }
+CRE_MPF #mpfid* { .mpfatr .blkcnt .blksz &mpf? &mpfmb? }
+CRE_CYC #cycid* { .cycatr { .nfymode &par1 &par2? &par3? &par4? } .cyctim .cycphs }
+CRE_ALM #almid* { .almatr { .nfymode &par1 &par2? &par3? &par4? } }
+ENA_SPR .tskpri
+CFG_INT .intno* { .intatr +intpri }
+CRE_ISR #isrid* { .isratr &exinf .intno &isr +isrpri }
+DEF_INH .inhno* { .inhatr &inthdr }
+DEF_EXC .excno* { .excatr &exchdr }
+DEF_ICS { .istksz &istk? }
+ATT_INI { .iniatr &exinf &inirtn }
+ATT_TER { .teratr &exinf &terrtn }
Index: asp3_wo_tecs/trunk/extension/subprio/kernel/kernel_rename.h
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/kernel/kernel_rename.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/subprio/kernel/kernel_rename.h	(revision 306)
@@ -186,190 +186,4 @@
 
 
-#ifdef TOPPERS_LABEL_ASM
-
-/*
- *  startup.c
- */
-#define _kerflg						__kernel_kerflg
-#define _exit_kernel				__kernel_exit_kernel
-
-/*
- *  task.c
- */
-#define _p_runtsk					__kernel_p_runtsk
-#define _p_schedtsk					__kernel_p_schedtsk
-#define _enadsp						__kernel_enadsp
-#define _dspflg						__kernel_dspflg
-#define _ready_queue				__kernel_ready_queue
-#define _ready_primap				__kernel_ready_primap
-#define _initialize_task			__kernel_initialize_task
-#define _search_schedtsk			__kernel_search_schedtsk
-#define _make_runnable				__kernel_make_runnable
-#define _make_non_runnable			__kernel_make_non_runnable
-#define _make_dormant				__kernel_make_dormant
-#define _make_active				__kernel_make_active
-#define _change_priority			__kernel_change_priority
-#define _change_subprio				__kernel_change_subprio
-#define _rotate_ready_queue			__kernel_rotate_ready_queue
-#define _task_terminate				__kernel_task_terminate
-
-/*
- *  taskhook.c
- */
-#define _mtxhook_check_ceilpri		__kernel_mtxhook_check_ceilpri
-#define _mtxhook_scan_ceilmtx		__kernel_mtxhook_scan_ceilmtx
-#define _mtxhook_release_all		__kernel_mtxhook_release_all
-
-/*
- *  wait.c
- */
-#define _make_wait_tmout			__kernel_make_wait_tmout
-#define _wait_complete				__kernel_wait_complete
-#define _wait_tmout					__kernel_wait_tmout
-#define _wait_tmout_ok				__kernel_wait_tmout_ok
-#define _wobj_make_wait				__kernel_wobj_make_wait
-#define _wobj_make_wait_tmout		__kernel_wobj_make_wait_tmout
-#define _init_wait_queue			__kernel_init_wait_queue
-
-/*
- *  time_event.c
- */
-#define _boundary_evttim			__kernel_boundary_evttim
-#define _current_evttim				__kernel_current_evttim
-#define _current_hrtcnt				__kernel_current_hrtcnt
-#define _monotonic_evttim			__kernel_monotonic_evttim
-#define _systim_offset				__kernel_systim_offset
-#define _in_signal_time				__kernel_in_signal_time
-#define _initialize_tmevt			__kernel_initialize_tmevt
-#define _tmevt_up					__kernel_tmevt_up
-#define _tmevt_down					__kernel_tmevt_down
-#define _update_current_evttim		__kernel_update_current_evttim
-#define _set_hrt_event				__kernel_set_hrt_event
-#define _tmevtb_register			__kernel_tmevtb_register
-#define _tmevtb_enqueue				__kernel_tmevtb_enqueue
-#define _tmevtb_dequeue				__kernel_tmevtb_dequeue
-#define _check_adjtim				__kernel_check_adjtim
-#define _tmevt_lefttim				__kernel_tmevt_lefttim
-#define _signal_time				__kernel_signal_time
-
-/*
- *  semaphore.c
- */
-#define _initialize_semaphore		__kernel_initialize_semaphore
-
-/*
- *  eventflag.c
- */
-#define _initialize_eventflag		__kernel_initialize_eventflag
-#define _check_flg_cond				__kernel_check_flg_cond
-
-/*
- *  dataqueue.c
- */
-#define _initialize_dataqueue		__kernel_initialize_dataqueue
-#define _enqueue_data				__kernel_enqueue_data
-#define _force_enqueue_data			__kernel_force_enqueue_data
-#define _dequeue_data				__kernel_dequeue_data
-#define _send_data					__kernel_send_data
-#define _force_send_data			__kernel_force_send_data
-#define _receive_data				__kernel_receive_data
-
-/*
- *  pridataq.c
- */
-#define _initialize_pridataq		__kernel_initialize_pridataq
-#define _enqueue_pridata			__kernel_enqueue_pridata
-#define _dequeue_pridata			__kernel_dequeue_pridata
-#define _send_pridata				__kernel_send_pridata
-#define _receive_pridata			__kernel_receive_pridata
-
-/*
- *  mutex.c
- */
-#define _initialize_mutex			__kernel_initialize_mutex
-#define _mutex_check_ceilpri		__kernel_mutex_check_ceilpri
-#define _mutex_scan_ceilmtx			__kernel_mutex_scan_ceilmtx
-#define _mutex_drop_priority		__kernel_mutex_drop_priority
-#define _mutex_acquire				__kernel_mutex_acquire
-#define _mutex_release				__kernel_mutex_release
-#define _mutex_release_all			__kernel_mutex_release_all
-
-/*
- *  mempfix.c
- */
-#define _initialize_mempfix			__kernel_initialize_mempfix
-#define _get_mpf_block				__kernel_get_mpf_block
-
-/*
- *  cyclic.c
- */
-#define _initialize_cyclic			__kernel_initialize_cyclic
-#define _call_cyclic				__kernel_call_cyclic
-
-/*
- *  alarm.c
- */
-#define _initialize_alarm			__kernel_initialize_alarm
-#define _call_alarm					__kernel_call_alarm
-
-/*
- *  interrupt.c
- */
-#define _initialize_interrupt		__kernel_initialize_interrupt
-
-/*
- *  exception.c
- */
-#define _initialize_exception		__kernel_initialize_exception
-
-/*
- *  kernel_cfg.c
- */
-#define _initialize_object			__kernel_initialize_object
-#define _call_inirtn				__kernel_call_inirtn
-#define _call_terrtn				__kernel_call_terrtn
-#define _subprio_primap				__kernel_subprio_primap
-#define _tmax_tskid					__kernel_tmax_tskid
-#define _tinib_table				__kernel_tinib_table
-#define _torder_table				__kernel_torder_table
-#define _tcb_table					__kernel_tcb_table
-#define _tmax_semid					__kernel_tmax_semid
-#define _seminib_table				__kernel_seminib_table
-#define _semcb_table				__kernel_semcb_table
-#define _tmax_flgid					__kernel_tmax_flgid
-#define _flginib_table				__kernel_flginib_table
-#define _flgcb_table				__kernel_flgcb_table
-#define _tmax_dtqid					__kernel_tmax_dtqid
-#define _dtqinib_table				__kernel_dtqinib_table
-#define _dtqcb_table				__kernel_dtqcb_table
-#define _tmax_pdqid					__kernel_tmax_pdqid
-#define _pdqinib_table				__kernel_pdqinib_table
-#define _pdqcb_table				__kernel_pdqcb_table
-#define _tmax_mtxid					__kernel_tmax_mtxid
-#define _mtxinib_table				__kernel_mtxinib_table
-#define _mtxcb_table				__kernel_mtxcb_table
-#define _tmax_mpfid					__kernel_tmax_mpfid
-#define _mpfinib_table				__kernel_mpfinib_table
-#define _mpfcb_table				__kernel_mpfcb_table
-#define _tmax_cycid					__kernel_tmax_cycid
-#define _cycinib_table				__kernel_cycinib_table
-#define _cyccb_table				__kernel_cyccb_table
-#define _tmax_almid					__kernel_tmax_almid
-#define _alminib_table				__kernel_alminib_table
-#define _almcb_table				__kernel_almcb_table
-#define _tnum_def_inhno				__kernel_tnum_def_inhno
-#define _inhinib_table				__kernel_inhinib_table
-#define _tnum_cfg_intno				__kernel_tnum_cfg_intno
-#define _intinib_table				__kernel_intinib_table
-#define _tnum_def_excno				__kernel_tnum_def_excno
-#define _excinib_table				__kernel_excinib_table
-#define _tmevt_heap					__kernel_tmevt_heap
-#define _istksz						__kernel_istksz
-#define _istk						__kernel_istk
-#define _istkpt						__kernel_istkpt
-
-
-#endif /* TOPPERS_LABEL_ASM */
-
 #include "target_rename.h"
 
Index: asp3_wo_tecs/trunk/extension/subprio/kernel/kernel_unrename.h
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/kernel/kernel_unrename.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/subprio/kernel/kernel_unrename.h	(revision 306)
@@ -187,190 +187,4 @@
 
 
-#ifdef TOPPERS_LABEL_ASM
-
-/*
- *  startup.c
- */
-#undef _kerflg
-#undef _exit_kernel
-
-/*
- *  task.c
- */
-#undef _p_runtsk
-#undef _p_schedtsk
-#undef _enadsp
-#undef _dspflg
-#undef _ready_queue
-#undef _ready_primap
-#undef _initialize_task
-#undef _search_schedtsk
-#undef _make_runnable
-#undef _make_non_runnable
-#undef _make_dormant
-#undef _make_active
-#undef _change_priority
-#undef _change_subprio
-#undef _rotate_ready_queue
-#undef _task_terminate
-
-/*
- *  taskhook.c
- */
-#undef _mtxhook_check_ceilpri
-#undef _mtxhook_scan_ceilmtx
-#undef _mtxhook_release_all
-
-/*
- *  wait.c
- */
-#undef _make_wait_tmout
-#undef _wait_complete
-#undef _wait_tmout
-#undef _wait_tmout_ok
-#undef _wobj_make_wait
-#undef _wobj_make_wait_tmout
-#undef _init_wait_queue
-
-/*
- *  time_event.c
- */
-#undef _boundary_evttim
-#undef _current_evttim
-#undef _current_hrtcnt
-#undef _monotonic_evttim
-#undef _systim_offset
-#undef _in_signal_time
-#undef _initialize_tmevt
-#undef _tmevt_up
-#undef _tmevt_down
-#undef _update_current_evttim
-#undef _set_hrt_event
-#undef _tmevtb_register
-#undef _tmevtb_enqueue
-#undef _tmevtb_dequeue
-#undef _check_adjtim
-#undef _tmevt_lefttim
-#undef _signal_time
-
-/*
- *  semaphore.c
- */
-#undef _initialize_semaphore
-
-/*
- *  eventflag.c
- */
-#undef _initialize_eventflag
-#undef _check_flg_cond
-
-/*
- *  dataqueue.c
- */
-#undef _initialize_dataqueue
-#undef _enqueue_data
-#undef _force_enqueue_data
-#undef _dequeue_data
-#undef _send_data
-#undef _force_send_data
-#undef _receive_data
-
-/*
- *  pridataq.c
- */
-#undef _initialize_pridataq
-#undef _enqueue_pridata
-#undef _dequeue_pridata
-#undef _send_pridata
-#undef _receive_pridata
-
-/*
- *  mutex.c
- */
-#undef _initialize_mutex
-#undef _mutex_check_ceilpri
-#undef _mutex_scan_ceilmtx
-#undef _mutex_drop_priority
-#undef _mutex_acquire
-#undef _mutex_release
-#undef _mutex_release_all
-
-/*
- *  mempfix.c
- */
-#undef _initialize_mempfix
-#undef _get_mpf_block
-
-/*
- *  cyclic.c
- */
-#undef _initialize_cyclic
-#undef _call_cyclic
-
-/*
- *  alarm.c
- */
-#undef _initialize_alarm
-#undef _call_alarm
-
-/*
- *  interrupt.c
- */
-#undef _initialize_interrupt
-
-/*
- *  exception.c
- */
-#undef _initialize_exception
-
-/*
- *  kernel_cfg.c
- */
-#undef _initialize_object
-#undef _call_inirtn
-#undef _call_terrtn
-#undef _subprio_primap
-#undef _tmax_tskid
-#undef _tinib_table
-#undef _torder_table
-#undef _tcb_table
-#undef _tmax_semid
-#undef _seminib_table
-#undef _semcb_table
-#undef _tmax_flgid
-#undef _flginib_table
-#undef _flgcb_table
-#undef _tmax_dtqid
-#undef _dtqinib_table
-#undef _dtqcb_table
-#undef _tmax_pdqid
-#undef _pdqinib_table
-#undef _pdqcb_table
-#undef _tmax_mtxid
-#undef _mtxinib_table
-#undef _mtxcb_table
-#undef _tmax_mpfid
-#undef _mpfinib_table
-#undef _mpfcb_table
-#undef _tmax_cycid
-#undef _cycinib_table
-#undef _cyccb_table
-#undef _tmax_almid
-#undef _alminib_table
-#undef _almcb_table
-#undef _tnum_def_inhno
-#undef _inhinib_table
-#undef _tnum_cfg_intno
-#undef _intinib_table
-#undef _tnum_def_excno
-#undef _excinib_table
-#undef _tmevt_heap
-#undef _istksz
-#undef _istk
-#undef _istkpt
-
-
-#endif /* TOPPERS_LABEL_ASM */
-
 #include "target_unrename.h"
 
Index: asp3_wo_tecs/trunk/extension/subprio/kernel/mutex.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/kernel/mutex.tf	(revision 302)
+++ 	(revision )
@@ -1,160 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: mutex.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		ãã¥ã¼ããã¯ã¹æ©è½ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_MTXID	$LENGTH(MTX.ID_LIST)$$NL$
-$FOREACH id MTX.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Mutex Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  ãã¥ã¼ããã¯ã¹ã®IDçªå·ãä¿æããå¤æ°
-$
-$IF USE_EXTERNAL_ID$
-	$FOREACH id MTX.ID_LIST$
-		const ID $id$_id = $+id$;$NL$
-	$END$
-$END$
-
-$
-$  ãã¥ã¼ããã¯ã¹IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_mtxid = (TMIN_MTXID + TNUM_MTXID - 1);$NL$
-$NL$
-
-$
-$  ãã¥ã¼ããã¯ã¹åæåãã­ãã¯
-$
-$IF LENGTH(MTX.ID_LIST)$
-	$FOREACH mtxid MTX.ID_LIST$
-$		// mtxatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2025ï¼½
-$		//ï¼TA_NULLï¼TA_TPRIï¼TA_CEILINGã®ãããã§ããªãå ´åï¼
-		$IF !(MTX.MTXATR[mtxid] == 0 || MTX.MTXATR[mtxid] == TA_TPRI
-										|| MTX.MTXATR[mtxid] == TA_CEILING)$
-			$ERROR MTX.TEXT_LINE[mtxid]$E_RSATR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"mtxatr", MTX.MTXATR[mtxid], mtxid, "CRE_MTX")$
-			$END$
-		$END$
-
-$		// ceilpriãæªæå®ã®å ´åã¯0ã¨è¦ãªã
-		$IF !LENGTH(MTX.CEILPRI[mtxid])$
-			$MTX.CEILPRI[mtxid] = 0$
-		$END$
-
-$		// åªå
-åº¦ä¸éãã¥ã¼ããã¯ã¹ã§ï¼(TMIN_TPRI <= ceilpri && ceilpri <=
-$		// TMAX_TPRI)ã§ãªãå ´åï¼E_PARï¼ï¼»NGKI2037ï¼½
-		$IF MTX.MTXATR[mtxid] == TA_CEILING && (MTX.CEILPRI[mtxid] < TMIN_TPRI
-											|| TMAX_TPRI < MTX.CEILPRI[mtxid])$
-			$ERROR MTX.TEXT_LINE[mtxid]$E_PAR:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"ceilpri", MTX.CEILPRI[mtxid], mtxid, "CRE_MTX")$
-			$END$
-		$END$
-
-$		// åªå
-åº¦ä¸éãã¥ã¼ããã¯ã¹ã§ï¼ceilpriããµãåªå
-åº¦ãä½¿ç¨ããã¨è¨­
-$		// å®ããã¦ããå ´åï¼E_ILUSEï¼ï¼»NGKI3682ï¼½
-		$IF MTX.MTXATR[mtxid] == TA_CEILING
-							&& LENGTH(FIND(spr_tskpri, MTX.CEILPRI[mtxid]))$
-			$ERROR MTX.TEXT_LINE[mtxid]$E_ILUSE:$SPC$
-				$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-							"ceilpri", MTX.CEILPRI[mtxid], mtxid, "CRE_MTX")$
-			$END$
-		$END$
-	$END$
-
-$	// ãã¥ã¼ããã¯ã¹åæåãã­ãã¯
-	const MTXINIB _kernel_mtxinib_table[TNUM_MTXID] = {$NL$
-	$JOINEACH mtxid MTX.ID_LIST ",\n"$
-		$TAB${$SPC$
-			($MTX.MTXATR[mtxid]$),$SPC$
-			INT_PRIORITY($MTX.CEILPRI[mtxid]$)$SPC$
-		}$END$$NL$
-	};$NL$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(const MTXINIB, _kernel_mtxinib_table);$NL$
-$END$$NL$
-
-$
-$  ãã¥ã¼ããã¯ã¹ç®¡çãã­ãã¯ã¨ãã¥ã¼ããã¯ã¹æ©è½åæåé¢æ°
-$
-$IF LENGTH(MTX.ID_LIST)$
-	MTXCB _kernel_mtxcb_table[TNUM_MTXID];$NL$
-	$initfuncs = APPEND(initfuncs, "_kernel_initialize_mutex();")$
-$ELSE$
-	TOPPERS_EMPTY_LABEL(MTXCB, _kernel_mtxcb_table);$NL$
-$END$$NL$
Index: asp3_wo_tecs/trunk/extension/subprio/kernel/mutex.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/kernel/mutex.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/subprio/kernel/mutex.trb	(revision 306)
@@ -0,0 +1,115 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: mutex.trb 630 2016-02-14 11:30:17Z ertl-hiro $
+# 
+
+#
+#		ãã¥ã¼ããã¯ã¹æ©è½ã®çæã¹ã¯ãªãã
+#
+
+class MutexObject < KernelObject
+  def initialize()
+    super("mtx", "mutex")
+  end
+
+  def prepare(key, params)
+    # mtxatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI2025ï¼½
+    # ï¼TA_NULLï¼TA_TPRIï¼TA_CEILINGã®ãããã§ããªãå ´åï¼
+    if !(params[:mtxatr] == $TA_NULL || params[:mtxatr] == $TA_TPRI \
+										|| params[:mtxatr] == $TA_CEILING)
+      error_illegal_id("E_RSATR", params, :mtxatr, :mtxid)
+    end
+
+    if params[:mtxatr] == $TA_CEILING
+      # åªå
+åº¦ä¸éãã¥ã¼ããã¯ã¹ã®å ´å
+      # ceilpriãæªæå®ã®å ´åã¯ã¨ã©ã¼ã¨ãã
+      if params[:ceilpri].nil?
+        error_api(params, "ceilpri must be specified in %apiname of %mtxid")
+
+      # (TMIN_TPRI <= ceilpri && ceilpri <= TMAX_TPRI)ã§ãªãå ´åï¼E_PARï¼
+      # ï¼»NGKI2037ï¼½
+      elsif !($TMIN_TPRI <= params[:ceilpri] && params[:ceilpri] <= $TMAX_TPRI)
+        error_illegal_id("E_PAR", params, :ceilpri, :mtxid)
+      end
+
+      # ceilpriããµãåªå
+åº¦ãä½¿ç¨ããã¨è¨­å®ããã¦ããå ´åï¼E_ILUSEï¼
+      # ï¼»NGKI3682ï¼½
+      if $subprioTskpri.has_key?(params[:ceilpri].val)
+        error_illegal_id("E_ILUSE", params, :ceilpri, :mtxid)
+      end
+    else
+      # åªå
+åº¦ä¸éãã¥ã¼ããã¯ã¹ã§ãªãå ´å
+      # ceilpriãæå®ããã¦ããå ´åã¯è­¦åã¡ãã»ã¼ã¸ãåºã
+      if !params[:ceilpri].nil?
+        warning_api(params, "%%ceilpri is ignored in %apiname of %mtxid")
+      end
+      params[:ceilpri] = 0
+    end
+  end
+
+  def generateInib(key, params)
+    return("(#{params[:mtxatr]}), INT_PRIORITY(#{params[:ceilpri]})")
+  end
+end
+
+#
+#  ãã¥ã¼ããã¯ã¹ã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Mutex Functions")
+MutexObject.new.generate()
Index: asp3_wo_tecs/trunk/extension/subprio/kernel/sys_manage.c
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/kernel/sys_manage.c	(revision 302)
+++ asp3_wo_tecs/trunk/extension/subprio/kernel/sys_manage.c	(revision 306)
@@ -53,5 +53,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: sys_manage.c 470 2015-12-30 09:50:36Z ertl-hiro $
+ *  $Id: sys_manage.c 684 2016-03-11 15:24:12Z ertl-hiro $
  */
 
@@ -174,5 +174,5 @@
 /*
  *  ã¿ã¹ã¯ã®åªå
-é ä½ã®åè»¢
+é ä½ã®åè»¢ï¼»NGKI3548ï¼½
  */
 #ifdef TOPPERS_rot_rdq
@@ -185,10 +185,10 @@
 
 	LOG_ROT_RDQ_ENTER(tskpri);
-	CHECK_UNL();
+	CHECK_UNL();								/*ï¼»NGKI2684ï¼½*/
 	if (tskpri == TPRI_SELF && !sense_context()) {
-		pri = p_runtsk->bpriority;
+		pri = p_runtsk->bpriority;				/*ï¼»NGKI2689ï¼½*/
 	}
 	else {
-		CHECK_PAR(VALID_TPRI(tskpri));
+		CHECK_PAR(VALID_TPRI(tskpri));			/*ï¼»NGKI2685ï¼½*/
 		pri = INT_PRIORITY(tskpri);
 	}
@@ -218,5 +218,5 @@
  *  å®è¡ç¶æ
 ã®ã¿ã¹ã¯IDã®åç
-§
+§ï¼»NGKI3550ï¼½
  */
 #ifdef TOPPERS_get_tid
@@ -228,5 +228,5 @@
 
 	LOG_GET_TID_ENTER(p_tskid);
-	CHECK_UNL();
+	CHECK_UNL();								/*ï¼»NGKI2707ï¼½*/
 
 	lock_cpu();
@@ -244,5 +244,5 @@
 /*
  *  å®è¡ã§ããã¿ã¹ã¯ã®æ°ã®åç
-§
+§ï¼»NGKI3623ï¼½
  */
 #ifdef TOPPERS_get_lod
@@ -256,10 +256,10 @@
 
 	LOG_GET_LOD_ENTER(p_tskid, p_load);
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI3624ï¼½ï¼»NGKI3625ï¼½*/
 	if (tskpri == TPRI_SELF) {
-		pri = p_runtsk->bpriority;
+		pri = p_runtsk->bpriority;				/*ï¼»NGKI3631ï¼½*/
 	}
 	else {
-		CHECK_PAR(VALID_TPRI(tskpri));
+		CHECK_PAR(VALID_TPRI(tskpri));			/*ï¼»NGKI3626ï¼½*/
 		pri = INT_PRIORITY(tskpri);
 	}
@@ -286,5 +286,5 @@
  *  æå®ããåªå
 é ä½ã®ã¿ã¹ã¯IDã®åç
-§
+§ï¼»NGKI3641ï¼½
  */
 #ifdef TOPPERS_get_nth
@@ -299,10 +299,10 @@
 
 	LOG_GET_NTH_ENTER(p_tskid, nth, p_tskid);
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI3642ï¼½ï¼»NGKI3643ï¼½*/
 	if (tskpri == TPRI_SELF) {
-		pri = p_runtsk->bpriority;
+		pri = p_runtsk->bpriority;				/*ï¼»NGKI3650ï¼½*/
 	}
 	else {
-		CHECK_PAR(VALID_TPRI(tskpri));
+		CHECK_PAR(VALID_TPRI(tskpri));			/*ï¼»NGKI3644ï¼½*/
 		pri = INT_PRIORITY(tskpri);
 	}
@@ -332,5 +332,5 @@
 /*
  *  CPUã­ãã¯ç¶æ
-ã¸ã®é·ç§»
+ã¸ã®é·ç§»ï¼»NGKI3538ï¼½
  */
 #ifdef TOPPERS_loc_cpu
@@ -343,6 +343,6 @@
 	LOG_LOC_CPU_ENTER();
 
-	if (!sense_lock()) {
-		lock_cpu();
+	if (!sense_lock()) {						/*ï¼»NGKI2731ï¼½*/
+		lock_cpu();								/*ï¼»NGKI2730ï¼½*/
 	}
 	ercd = E_OK;
@@ -356,5 +356,5 @@
 /*
  *  CPUã­ãã¯ç¶æ
-ã®è§£é¤
+ã®è§£é¤ï¼»NGKI3539ï¼½
  *
  *  CPUã­ãã¯ä¸­ã¯ï¼ãã£ã¹ããããå¿
@@ -374,6 +374,6 @@
 	LOG_UNL_CPU_ENTER();
 
-	if (sense_lock()) {
-		unlock_cpu();
+	if (sense_lock()) {							/*ï¼»NGKI2738ï¼½*/
+		unlock_cpu();							/*ï¼»NGKI2737ï¼½*/
 	}
 	ercd = E_OK;
@@ -386,5 +386,5 @@
 
 /*
- *  ãã£ã¹ãããã®ç¦æ­¢
+ *  ãã£ã¹ãããã®ç¦æ­¢ï¼»NGKI2740ï¼½
  */
 #ifdef TOPPERS_dis_dsp
@@ -396,5 +396,5 @@
 
 	LOG_DIS_DSP_ENTER();
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI2741ï¼½ï¼»NGKI2742ï¼½*/
 
 	lock_cpu();
@@ -412,5 +412,5 @@
 
 /*
- *  ãã£ã¹ãããã®è¨±å¯
+ *  ãã£ã¹ãããã®è¨±å¯ï¼»NGKI2746ï¼½
  */
 #ifdef TOPPERS_ena_dsp
@@ -422,5 +422,5 @@
 
 	LOG_ENA_DSP_ENTER();
-	CHECK_TSKCTX_UNL();
+	CHECK_TSKCTX_UNL();							/*ï¼»NGKI2747ï¼½ï¼»NGKI2748ï¼½*/
 
 	lock_cpu();
@@ -455,5 +455,5 @@
 /*
  *  ã³ã³ãã­ã¹ãã®åç
-§
+§ï¼»NGKI2752ï¼½
  */
 #ifdef TOPPERS_sns_ctx
@@ -475,5 +475,5 @@
  *  CPUã­ãã¯ç¶æ
 ã®åç
-§
+§ï¼»NGKI2754ï¼½
  */
 #ifdef TOPPERS_sns_loc
@@ -495,5 +495,5 @@
  *  ãã£ã¹ãããç¦æ­¢ç¶æ
 ã®åç
-§
+§ï¼»NGKI2756ï¼½
  */
 #ifdef TOPPERS_sns_dsp
@@ -515,5 +515,5 @@
  *  ãã£ã¹ãããä¿çç¶æ
 ã®åç
-§
+§ï¼»NGKI2758ï¼½
  */
 #ifdef TOPPERS_sns_dpn
@@ -535,5 +535,5 @@
  *  ã«ã¼ãã«éåä½ç¶æ
 ã®åç
-§
+§ï¼»NGKI2760ï¼½
  */
 #ifdef TOPPERS_sns_ker
Index: asp3_wo_tecs/trunk/extension/subprio/kernel/task.tf
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/kernel/task.tf	(revision 302)
+++ 	(revision )
@@ -1,244 +1,0 @@
-$
-$   TOPPERS/ASP Kernel
-$       Toyohashi Open Platform for Embedded Real-Time Systems/
-$       Advanced Standard Profile Kernel
-$ 
-$   Copyright (C) 2007 by TAKAGI Nobuhisa
-$   Copyright (C) 2007-2014 by Embedded and Real-Time Systems Laboratory
-$               Graduate School of Information Science, Nagoya Univ., JAPAN
-$ 
-$   ä¸è¨èä½æ¨©è
-ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
-$   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
-$   å¤ã»åé
-å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
-$   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
-$       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
-$       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
-$   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
-$       è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
-$       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
-$       ç¨ã§ããªãå½¢ã§åé
-å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
-$       ã¨ï¼
-$     (a) åé
-å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
-ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
-$         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
-$     (b) åé
-å¸ã®å½¢æ
-ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
-$         å ±åãããã¨ï¼
-$   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
-$       å®³ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ããå
-è²¬ãããã¨ï¼
-$       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
-$       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
-ããã³TOPPERSãã­ã¸ã§ã¯ãã
-$       å
-è²¬ãããã¨ï¼
-$ 
-$   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
-ã
-$   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
-$   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
-$   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
-$   ã®è²¬ä»»ãè² ããªãï¼
-$ 
-$   $Id: task.tf 480 2016-01-03 07:37:12Z ertl-hiro $
-$ 
-
-$
-$		ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«ã®ãã³ãã¬ã¼ããã¡ã¤ã«
-$
-
-$
-$  kernel_cfg.hã®çæ
-$
-$FILE "kernel_cfg.h.new"$
-
-#define TNUM_TSKID	$LENGTH(TSK.ID_LIST)$$NL$
-$FOREACH id TSK.ID_LIST$
-	#define $id$	$+id$$NL$
-$END$
-
-$
-$  kernel_cfg.cã®çæ
-$
-$FILE "kernel_cfg.c"$
-
-/*$NL$
-$SPC$*  Task Management Functions$NL$
-$SPC$*/$NL$
-$NL$
-
-$
-$  ENA_SPRã®ã¨ã©ã¼ãã§ãã¯
-$
-$spr_tskpri = {}$
-$FOREACH i SPR.ORDER_LIST$
-$	// (TMIN_TPRI <= tskpri && tskpri <= TMAX_TPRI)ã§ãªãå ´åï¼»NGKI3678ï¼½
-	$IF !(TMIN_TPRI <= SPR.TSKPRI[i] && SPR.TSKPRI[i] <= TMAX_TPRI)$
-		$ERROR SPR.TEXT_LINE[i]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' in %3%"),
-						"tskpri", SPR.TSKPRI[i], "ENA_SPR")$
-		$END$
-	$END$
-
-	$IF !LENGTH(FIND(spr_tskpri, SPR.TSKPRI[i]))$
-		$spr_tskpri = APPEND(spr_tskpri, SPR.TSKPRI[i])$
-	$ELSE$
-$		// SPR.TSKPRI[i]ããµãåªå
-åº¦ãä½¿ç¨ããåªå
-åº¦ã«è¨­å®æ¸ã¿ã®å ´å
-		$WARNING SPR.TEXT_LINE[i]$
-			$FORMAT(_("%1% `%2%\' in %3% is same with %4%"),
-						"tskpri", SPR.TSKPRI[i], "ENA_SPR",
-						AT(spr_tskpri, FIND(spr_tskpri, SPR.TSKPRI[i])))$
-		$END$
-	$END$
-$END$
-
-$
-$  ãµãåªå
-åº¦ãç¨ãã¦ã¹ã±ã¸ã¥ã¼ã«ããåªå
-åº¦
-$
-const uint16_t _kernel_subprio_primap =$SPC$
-$IF LENGTH(spr_tskpri)$
-	($JOINEACH tskpri spr_tskpri " | "$
-		PRIMAP_BIT(INT_PRIORITY($tskpri$))
-	$END$)
-$ELSE$
-	0U
-$END$;$NL$
-$NL$
-
-$
-$  ã¿ã¹ã¯ã®IDçªå·ãä¿æããå¤æ°
-$
-$IF USE_EXTERNAL_ID$
-	$FOREACH id TSK.ID_LIST$
-		const ID $id$_id = $+id$;$NL$
-	$END$$NL$
-$END$
-
-$
-$  ã¿ã¹ã¯ã1ã¤ãç»é²ããã¦ããªãå ´åï¼»NGKI0033ï¼½
-$
-$IF !LENGTH(TSK.ID_LIST)$
-	$ERROR$$FORMAT(_("no task is registered"))$$END$
-$END$
-
-$
-$  ã¿ã¹ã¯IDçªå·ã®æå¤§å¤
-$
-const ID _kernel_tmax_tskid = (TMIN_TSKID + TNUM_TSKID - 1);$NL$
-$NL$
-
-$
-$  ã¨ã©ã¼ãã§ãã¯
-$
-$FOREACH tskid TSK.ID_LIST$
-$	// tskatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1028ï¼½
-$	//ï¼TA_ACTï¼TA_NOACTQUEï¼TARGET_TSKATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
-	$IF (TSK.TSKATR[tskid] & ~(TA_ACT|TA_NOACTQUE|TARGET_TSKATR)) != 0$
-		$ERROR TSK.TEXT_LINE[tskid]$E_RSATR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-						"tskatr", TSK.TSKATR[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-
-$	// (TMIN_TPRI <= itskpri && itskpri <= TMAX_TPRI)ã§ãªãå ´åï¼»NGKI1034ï¼½
-	$IF !(TMIN_TPRI <= TSK.ITSKPRI[tskid] && TSK.ITSKPRI[tskid] <= TMAX_TPRI)$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("illegal %1% `%2%\' of `%3%\' in %4%"),
-						"itskpri", TSK.ITSKPRI[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-$END$
-
-$
-$  ã¹ã¿ãã¯é åã®çæã¨ããã«é¢ããã¨ã©ã¼ãã§ãã¯
-$
-$FOREACH tskid TSK.ID_LIST$
-$	// stkszã0ä»¥ä¸ãï¼ã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_STKSZï¼ããã
-$	// å°ããå ´åï¼»NGKI1042ï¼½
-	$IF TSK.STKSZ[tskid] <= 0 || (TARGET_MIN_STKSZ
-									&& TSK.STKSZ[tskid] < TARGET_MIN_STKSZ)$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("too small %1% `%2%\' of `%3%\' in %4%"),
-						"stksz", TSK.STKSZ[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-
-$ 	// stkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´åï¼»NGKI1056ï¼½
-	$IF !EQ(TSK.STK[tskid], "NULL") && CHECK_STKSZ_ALIGN
-							&& (TSK.STKSZ[tskid] & (CHECK_STKSZ_ALIGN - 1))$
-		$ERROR TSK.TEXT_LINE[tskid]$E_PAR:$SPC$
-			$FORMAT(_("%1% `%2%\' of `%3%\' in %4% is not aligned"),
-						"stksz", TSK.STKSZ[tskid], tskid, "CRE_TSK")$
-		$END$
-	$END$
-
-$	// ã¹ã¿ãã¯é åã®è¨­å®ï¼»NGKI1041ï¼½
-	$IF EQ(TSK.STK[tskid],"NULL")$
-$		// ã¹ã¿ãã¯é åã®çæï¼»NGKI1049ï¼½
-		$TSK.TINIB_STKSZ[tskid] = ALLOC_STACK(CONCAT("_kernel_stack_",
-												tskid), TSK.STKSZ[tskid])$
-		$TSK.TINIB_STK[tskid] = CONCAT("_kernel_stack_", tskid)$
-	$ELSE$
-		$TSK.TINIB_STKSZ[tskid] = FORMAT("(%1%)", TSK.STKSZ[tskid])$
-		$TSK.TINIB_STK[tskid] = FORMAT("(void *)(%1%)", TSK.STK[tskid])$
-	$END$
-$END$
-$NL$
-
-$
-$  ã¿ã¹ã¯åæåãã­ãã¯ã®çæï¼ã¿ã¹ã¯ã¯1åä»¥ä¸å­å¨ããï¼
-$
-const TINIB _kernel_tinib_table[TNUM_TSKID] = {$NL$
-$JOINEACH tskid TSK.ID_LIST ",\n"$
-	$TAB${$SPC$
-$		// ã¿ã¹ã¯å±æ§ï¼æ¡å¼µæ
-å ±ï¼èµ·åçªå°ï¼èµ·åæåªå
-åº¦
-		($TSK.TSKATR[tskid]$),$SPC$
-		(intptr_t)($TSK.EXINF[tskid]$),$SPC$
-		(TASK)($TSK.TASK[tskid]$),$SPC$
-		INT_PRIORITY($TSK.ITSKPRI[tskid]$),$SPC$
-
-$		// ã¿ã¹ã¯åæåã³ã³ãã­ã¹ããã­ãã¯ï¼ã¹ã¿ãã¯é å
-		$IF USE_TSKINICTXB$
-			$GENERATE_TSKINICTXB(tskid)$
-		$ELSE$
-			$TSK.TINIB_STKSZ[tskid]$, $TSK.TINIB_STK[tskid]$
-		$END$$SPC$
-	}$END$$NL$
-};$NL$
-$NL$
-
-$
-$  ã¿ã¹ã¯çæé åºãã¼ãã«ã®çæ
-$
-const ID _kernel_torder_table[TNUM_TSKID] = {$NL$
-$TAB$$JOINEACH tskid TSK.ORDER_LIST ", "$$tskid$$END$$NL$
-};$NL$
-$NL$
-
-$
-$  ã¿ã¹ã¯ç®¡çãã­ãã¯ã®çæ
-$
-TCB _kernel_tcb_table[TNUM_TSKID];$NL$
-$NL$
-
-$
-$  ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«åæåé¢æ°
-$
-$initfuncs = "_kernel_initialize_task();"$
Index: asp3_wo_tecs/trunk/extension/subprio/kernel/task.trb
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/kernel/task.trb	(revision 306)
+++ asp3_wo_tecs/trunk/extension/subprio/kernel/task.trb	(revision 306)
@@ -0,0 +1,174 @@
+# -*- coding: utf-8 -*-
+#
+#   TOPPERS/ASP Kernel
+#       Toyohashi Open Platform for Embedded Real-Time Systems/
+#       Advanced Standard Profile Kernel
+# 
+#   Copyright (C) 2015 by FUJI SOFT INCORPORATED, JAPAN
+#   Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
+#               Graduate School of Information Science, Nagoya Univ., JAPAN
+# 
+#   ä¸è¨èä½æ¨©è
+ã¯ï¼ä»¥ä¸ã®(1)ã(4)ã®æ¡ä»¶ãæºããå ´åã«éãï¼æ¬ã½ããã¦ã§
+#   ã¢ï¼æ¬ã½ããã¦ã§ã¢ãæ¹å¤ãããã®ãå«ãï¼ä»¥ä¸åãï¼ãä½¿ç¨ã»è¤è£½ã»æ¹
+#   å¤ã»åé
+å¸ï¼ä»¥ä¸ï¼å©ç¨ã¨å¼ã¶ï¼ãããã¨ãç¡åã§è¨±è«¾ããï¼
+#   (1) æ¬ã½ããã¦ã§ã¢ãã½ã¼ã¹ã³ã¼ãã®å½¢ã§å©ç¨ããå ´åã«ã¯ï¼ä¸è¨ã®èä½
+#       æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãï¼ãã®ã¾ã¾ã®å½¢ã§ã½ã¼
+#       ã¹ã³ã¼ãä¸­ã«å«ã¾ãã¦ãããã¨ï¼
+#   (2) æ¬ã½ããã¦ã§ã¢ãï¼ã©ã¤ãã©ãªå½¢å¼ãªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨
+#       è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®èä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨
+#       ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#   (3) æ¬ã½ããã¦ã§ã¢ãï¼æ©å¨ã«çµã¿è¾¼ããªã©ï¼ä»ã®ã½ããã¦ã§ã¢éçºã«ä½¿
+#       ç¨ã§ããªãå½¢ã§åé
+å¸ããå ´åã«ã¯ï¼æ¬¡ã®ããããã®æ¡ä»¶ãæºããã
+#       ã¨ï¼
+#     (a) åé
+å¸ã«ä¼´ããã­ã¥ã¡ã³ãï¼å©ç¨è
+ããã¥ã¢ã«ãªã©ï¼ã«ï¼ä¸è¨ã®è
+#         ä½æ¨©è¡¨ç¤ºï¼ãã®å©ç¨æ¡ä»¶ããã³ä¸è¨ã®ç¡ä¿è¨¼è¦å®ãæ²è¼ãããã¨ï¼
+#     (b) åé
+å¸ã®å½¢æ
+ãï¼å¥ã«å®ããæ¹æ³ã«ãã£ã¦ï¼TOPPERSãã­ã¸ã§ã¯ãã«
+#         å ±åãããã¨ï¼
+#   (4) æ¬ã½ããã¦ã§ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæ
+#       å®³ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ããå
+è²¬ãããã¨ï¼
+#       ã¾ãï¼æ¬ã½ããã¦ã§ã¢ã®ã¦ã¼ã¶ã¾ãã¯ã¨ã³ãã¦ã¼ã¶ããã®ãããªãç
+#       ç±ã«åºã¥ãè«æ±ãããï¼ä¸è¨èä½æ¨©è
+ããã³TOPPERSãã­ã¸ã§ã¯ãã
+#       å
+è²¬ãããã¨ï¼
+# 
+#   æ¬ã½ããã¦ã§ã¢ã¯ï¼ç¡ä¿è¨¼ã§æä¾ããã¦ãããã®ã§ããï¼ä¸è¨èä½æ¨©è
+ã
+#   ãã³TOPPERSãã­ã¸ã§ã¯ãã¯ï¼æ¬ã½ããã¦ã§ã¢ã«é¢ãã¦ï¼ç¹å®ã®ä½¿ç¨ç®ç
+#   ã«å¯¾ããé©åæ§ãå«ãã¦ï¼ãããªãä¿è¨¼ãè¡ããªãï¼ã¾ãï¼æ¬ã½ããã¦ã§
+#   ã¢ã®å©ç¨ã«ããç´æ¥çã¾ãã¯éæ¥çã«çãããããªãæå®³ã«é¢ãã¦ãï¼ã
+#   ã®è²¬ä»»ãè² ããªãï¼
+# 
+#   $Id: task.trb 668 2016-03-03 13:57:53Z ertl-hiro $
+# 
+
+#
+#		ã¿ã¹ã¯ç®¡çã¢ã¸ã¥ã¼ã«ã®çæã¹ã¯ãªãã
+#
+
+class TaskObject < KernelObject
+  def initialize()
+    super("tsk", "task", "t")
+  end
+
+  def prepare(key, params)
+    # ãã©ã¡ã¼ã¿ãçç¥ãããæã®ããã©ã«ãå¤ã®è¨­å®
+    params[:stk] ||= "NULL"
+
+    # tskatrãç¡å¹ã®å ´åï¼E_RSATRï¼ï¼»NGKI1028ï¼½
+    #ï¼TA_ACTï¼TA_NOACTQUEï¼TARGET_TSKATRä»¥å¤ã®ããããã»ããããã¦ããå ´åï¼
+    if (params[:tskatr] & ~($TA_ACT|$TA_NOACTQUE|$TARGET_TSKATR)) != 0
+      error_illegal_id("E_RSATR", params, :tskatr, :tskid)
+    end
+
+    # (TMIN_TPRI <= itskpri && itskpri <= TMAX_TPRI)ã§ãªãå ´åï¼»NGKI1034ï¼½
+    if !($TMIN_TPRI <= params[:itskpri] && params[:itskpri] <= $TMAX_TPRI)
+      error_illegal_id("E_PAR", params, :itskpri, :tskid)
+    end
+
+    # stkszãã¿ã¼ã²ããå®ç¾©ã®æå°å¤ï¼TARGET_MIN_STKSZï¼æªå®ç¾©ã®å ´åã¯1ï¼
+    # ãããå°ããå ´åï¼»NGKI1042ï¼½
+    if params[:stksz] < $TARGET_MIN_STKSZ
+      error_wrong_id("E_PAR", params, :stksz, :tskid, "too small")
+    end
+
+    # ã¹ã¿ãã¯é åã®è¨­å®ï¼»NGKI1041ï¼½
+    if params[:stk] == "NULL"
+      # ã¹ã¿ãã¯é åã®çæï¼»NGKI1049ï¼½
+      stkName = "_kernel_stack_#{params[:tskid]}"
+      params[:tinib_stksz] = AllocStack(stkName, params[:stksz])
+      params[:tinib_stk] = stkName
+    else
+      # stkszãã¹ã¿ãã¯é åã®ãµã¤ãºã¨ãã¦æ­£ãããªãå ´åï¼»NGKI1056ï¼½
+      if (params[:stksz] & ($CHECK_STKSZ_ALIGN - 1)) != 0
+        error_wrong_id("E_PAR", params, :stksz, :tskid, "not aligned")
+      end
+
+      params[:tinib_stksz] = params[:stksz]
+      params[:tinib_stk] = "(void *)(#{params[:stk]})"
+    end
+  end
+
+  def generateInib(key, params)
+    if $USE_TSKINICTXB
+      tskinictxb = GenerateTskinictxb(key, params)
+    else
+      tskinictxb = "#{params[:tinib_stksz]}, #{params[:tinib_stk]}"
+    end
+    return("(#{params[:tskatr]}), (intptr_t)(#{params[:exinf]}), " \
+			"(TASK)(#{params[:task]}), INT_PRIORITY(#{params[:itskpri]}), " \
+			+ tskinictxb)
+  end
+end
+
+#
+#  ã¿ã¹ã¯ç®¡çã«é¢ããæ
+å ±ã®çæ
+#
+$kernelCfgC.comment_header("Task Management Functions")
+if $cfgData[:CRE_TSK].size() == 0
+  error("no task is registered")
+end
+TaskObject.new.generate()
+
+# ã¿ã¹ã¯çæé åºãã¼ãã«ã®çæ
+$kernelCfgC.add("const ID _kernel_torder_table[TNUM_TSKID] = { ")
+$kernelCfgC.append("\t")
+$cfgData[:CRE_TSK].each_with_index do |(key, params), index|
+  $kernelCfgC.append(", ") if index > 0
+  $kernelCfgC.append("#{params[:tskid]}")
+end
+$kernelCfgC.add
+$kernelCfgC.add2("};")
+
+#
+#  ENA_SPRã®å¦ç
+#
+# ã¨ã©ã¼ãã§ãã¯
+$subprioTskpri = {}
+$cfgData[:ENA_SPR].each do |key, params|
+  tskpriVal = params[:tskpri].val
+
+  #	(TMIN_TPRI <= tskpri && tskpri <= TMAX_TPRI)ã§ãªãå ´åï¼»NGKI3678ï¼½
+  if !($TMIN_TPRI <= tskpriVal && tskpriVal <= $TMAX_TPRI)
+    error_illegal("E_PAR", params, :tskpri)
+  end
+
+  if !$subprioTskpri.has_key?(tskpriVal)
+    $subprioTskpri[tskpriVal] = params[:tskpri]
+  else
+    # tskpriValããµãåªå
+åº¦ãä½¿ç¨ããåªå
+åº¦ã«è¨­å®æ¸ã¿ã®å ´å
+    warning_api(params, "tskpri `#{params[:tskpri]}' in ENA_SPR" \
+								" is same with #{$subprioTskpri[tskpriVal]}")
+  end
+end
+
+# ãµãåªå
+åº¦ãç¨ãã¦ã¹ã±ã¸ã¥ã¼ã«ããåªå
+åº¦ã®ãããããã
+$kernelCfgC.append("const uint16_t _kernel_subprio_primap = ")
+if $subprioTskpri.size > 0
+  $kernelCfgC.append("(")
+  $subprioTskpri.each_with_index do |(tskpriVal, tskpri), index|
+    $kernelCfgC.append(" | ") if index > 0
+    $kernelCfgC.append("PRIMAP_BIT(INT_PRIORITY(#{tskpri}))")
+  end
+  $kernelCfgC.add2(");")
+else
+  $kernelCfgC.add2("0U;")
+end
Index: asp3_wo_tecs/trunk/extension/subprio/test/test_subprio1.cfg
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/test/test_subprio1.cfg	(revision 302)
+++ asp3_wo_tecs/trunk/extension/subprio/test/test_subprio1.cfg	(revision 306)
@@ -3,10 +3,7 @@
 åº¦æ©è½ã®ãã¹ã(1)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
  *
- *  $Id: test_subprio1.cfg 260 2014-10-05 02:33:43Z ertl-hiro $
+ *  $Id: test_subprio1.cfg 572 2016-02-01 14:40:09Z ertl-hiro $
  */
-INCLUDE("target_timer.cfg");
-INCLUDE("syssvc/syslog.cfg");
-INCLUDE("syssvc/banner.cfg");
-INCLUDE("syssvc/serial.cfg");
+INCLUDE("tecsgen.cfg");
 
 #include "test_subprio1.h"
Index: asp3_wo_tecs/trunk/extension/subprio/test/test_subprio2.c
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/test/test_subprio2.c	(revision 302)
+++ asp3_wo_tecs/trunk/extension/subprio/test/test_subprio2.c	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2014-2015 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2014-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_subprio2.c 310 2015-02-08 13:46:46Z ertl-hiro $
+ *  $Id: test_subprio2.c 738 2016-04-05 14:19:24Z ertl-hiro $
  */
 
@@ -126,5 +126,5 @@
  *		chg_spr(TASK2, 10) -> E_CTX					... (B-2)
  *		unl_cpu()
- *		sta_alm(ALM1, 10000U)
+ *		sta_alm(ALM1, TEST_TIME_CP) ... ALM1-1ãå®è¡éå§ããã¾ã§
  *		slp_tsk()
  *	== TASK4ï¼ç¶ãï¼==
@@ -214,5 +214,5 @@
 	check_ercd(ercd, E_OK);
 
-	ercd = sta_alm(ALM1, 10000U);
+	ercd = sta_alm(ALM1, TEST_TIME_CP);
 	check_ercd(ercd, E_OK);
 
Index: asp3_wo_tecs/trunk/extension/subprio/test/test_subprio2.cfg
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/test/test_subprio2.cfg	(revision 302)
+++ asp3_wo_tecs/trunk/extension/subprio/test/test_subprio2.cfg	(revision 306)
@@ -3,10 +3,7 @@
 åº¦æ©è½ã®ãã¹ã(2)ã®ã·ã¹ãã ã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãã¡ã¤ã«
  *
- *  $Id: test_subprio2.cfg 327 2015-06-21 06:42:01Z ertl-hiro $
+ *  $Id: test_subprio2.cfg 572 2016-02-01 14:40:09Z ertl-hiro $
  */
-INCLUDE("target_timer.cfg");
-INCLUDE("syssvc/syslog.cfg");
-INCLUDE("syssvc/banner.cfg");
-INCLUDE("syssvc/serial.cfg");
+INCLUDE("tecsgen.cfg");
 
 #include "test_subprio2.h"
Index: asp3_wo_tecs/trunk/extension/subprio/test/test_subprio2.h
===================================================================
--- asp3_wo_tecs/trunk/extension/subprio/test/test_subprio2.h	(revision 302)
+++ asp3_wo_tecs/trunk/extension/subprio/test/test_subprio2.h	(revision 306)
@@ -3,5 +3,5 @@
  *      Toyohashi Open Platform for Embedded Real-Time Systems
  * 
- *  Copyright (C) 2014 by Embedded and Real-Time Systems Laboratory
+ *  Copyright (C) 2014-2016 by Embedded and Real-Time Systems Laboratory
  *              Graduate School of Information Science, Nagoya Univ., JAPAN
  * 
@@ -50,5 +50,5 @@
  *  ã®è²¬ä»»ãè² ããªãï¼
  * 
- *  $Id: test_subprio2.h 258 2014-10-04 19:37:38Z ertl-hiro $
+ *  $Id: test_subprio2.h 737 2016-04-05 13:11:23Z ertl-hiro $
  */
 
@@ -81,4 +81,13 @@
 #endif /* STACK_SIZE */
 
+#ifndef TEST_TIME_CP
+#define TEST_TIME_CP	50000U		/* ãã§ãã¯ãã¤ã³ãå°éæ
+å ±ã®åºåæé */
+#endif /* TEST_TIME_CP */
+
+#ifndef TEST_TIME_PROC
+#define TEST_TIME_PROC	1000U		/* ãã§ãã¯ãã¤ã³ããéããªãå ´åã®æé */
+#endif /* TEST_TIME_PROC */
+
 /*
  *  é¢æ°ã®ãã­ãã¿ã¤ãå®£è¨
