OSDN Git Service

Add toppers-jsp/ in nxtOSEK_v205b0.zip. They are licensed under TOPPERS license.
[nxt-jsp/etrobo-atk.git] / nxtOSEK / toppers_jsp / kernel / cyclic.h
diff --git a/nxtOSEK/toppers_jsp/kernel/cyclic.h b/nxtOSEK/toppers_jsp/kernel/cyclic.h
new file mode 100644 (file)
index 0000000..0eaeba0
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ *  TOPPERS/JSP Kernel
+ *      Toyohashi Open Platform for Embedded Real-Time Systems/
+ *      Just Standard Profile Kernel
+ * 
+ *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
+ *                              Toyohashi Univ. of Technology, JAPAN
+ * 
+ *  ¾åµ­Ãøºî¸¢¼Ô¤Ï¡¤°Ê²¼¤Î (1)¡Á(4) ¤Î¾ò·ï¤«¡¤Free Software Foundation 
+ *  ¤Ë¤è¤Ã¤Æ¸øɽ¤µ¤ì¤Æ¤¤¤ë GNU General Public License ¤Î Version 2 ¤Ëµ­
+ *  ½Ò¤µ¤ì¤Æ¤¤¤ë¾ò·ï¤òËþ¤¿¤¹¾ì¹ç¤Ë¸Â¤ê¡¤ËÜ¥½¥Õ¥È¥¦¥§¥¢¡ÊËÜ¥½¥Õ¥È¥¦¥§¥¢
+ *  ¤ò²þÊѤ·¤¿¤â¤Î¤ò´Þ¤à¡¥°Ê²¼Æ±¤¸¡Ë¤ò»ÈÍÑ¡¦Ê£À½¡¦²þÊÑ¡¦ºÆÇÛÉۡʰʲ¼¡¤
+ *  ÍøÍѤȸƤ֡ˤ¹¤ë¤³¤È¤ò̵½þ¤ÇµöÂú¤¹¤ë¡¥
+ *  (1) ËÜ¥½¥Õ¥È¥¦¥§¥¢¤ò¥½¡¼¥¹¥³¡¼¥É¤Î·Á¤ÇÍøÍѤ¹¤ë¾ì¹ç¤Ë¤Ï¡¤¾åµ­¤ÎÃøºî
+ *      ¸¢É½¼¨¡¤¤³¤ÎÍøÍѾò·ï¤ª¤è¤Ó²¼µ­¤Î̵Êݾڵ¬Ä꤬¡¤¤½¤Î¤Þ¤Þ¤Î·Á¤Ç¥½¡¼
+ *      ¥¹¥³¡¼¥ÉÃæ¤Ë´Þ¤Þ¤ì¤Æ¤¤¤ë¤³¤È¡¥
+ *  (2) ËÜ¥½¥Õ¥È¥¦¥§¥¢¤ò¡¤¥é¥¤¥Ö¥é¥ê·Á¼°¤Ê¤É¡¤Â¾¤Î¥½¥Õ¥È¥¦¥§¥¢³«È¯¤Ë»È
+ *      ÍѤǤ­¤ë·Á¤ÇºÆÇÛÉÛ¤¹¤ë¾ì¹ç¤Ë¤Ï¡¤ºÆÇÛÉÛ¤Ëȼ¤¦¥É¥­¥å¥á¥ó¥È¡ÊÍøÍÑ
+ *      ¼Ô¥Þ¥Ë¥å¥¢¥ë¤Ê¤É¡Ë¤Ë¡¤¾åµ­¤ÎÃøºî¸¢É½¼¨¡¤¤³¤ÎÍøÍѾò·ï¤ª¤è¤Ó²¼µ­
+ *      ¤Î̵Êݾڵ¬Äê¤ò·ÇºÜ¤¹¤ë¤³¤È¡¥
+ *  (3) ËÜ¥½¥Õ¥È¥¦¥§¥¢¤ò¡¤µ¡´ï¤ËÁȤ߹þ¤à¤Ê¤É¡¤Â¾¤Î¥½¥Õ¥È¥¦¥§¥¢³«È¯¤Ë»È
+ *      ÍѤǤ­¤Ê¤¤·Á¤ÇºÆÇÛÉÛ¤¹¤ë¾ì¹ç¤Ë¤Ï¡¤¼¡¤Î¤¤¤º¤ì¤«¤Î¾ò·ï¤òËþ¤¿¤¹¤³
+ *      ¤È¡¥
+ *    (a) ºÆÇÛÉÛ¤Ëȼ¤¦¥É¥­¥å¥á¥ó¥È¡ÊÍøÍѼԥޥ˥奢¥ë¤Ê¤É¡Ë¤Ë¡¤¾åµ­¤ÎÃø
+ *        ºî¸¢É½¼¨¡¤¤³¤ÎÍøÍѾò·ï¤ª¤è¤Ó²¼µ­¤Î̵Êݾڵ¬Äê¤ò·ÇºÜ¤¹¤ë¤³¤È¡¥
+ *    (b) ºÆÇÛÉۤηÁÂÖ¤ò¡¤Ê̤ËÄê¤á¤ëÊýË¡¤Ë¤è¤Ã¤Æ¡¤TOPPERS¥×¥í¥¸¥§¥¯¥È¤Ë
+ *        Êó¹ð¤¹¤ë¤³¤È¡¥
+ *  (4) ËÜ¥½¥Õ¥È¥¦¥§¥¢¤ÎÍøÍѤˤè¤êľÀÜŪ¤Þ¤¿¤Ï´ÖÀÜŪ¤ËÀ¸¤¸¤ë¤¤¤«¤Ê¤ë»
+ *      ³²¤«¤é¤â¡¤¾åµ­Ãøºî¸¢¼Ô¤ª¤è¤ÓTOPPERS¥×¥í¥¸¥§¥¯¥È¤òÌÈÀÕ¤¹¤ë¤³¤È¡¥
+ * 
+ *  ËÜ¥½¥Õ¥È¥¦¥§¥¢¤Ï¡¤ÌµÊݾڤÇÄ󶡤µ¤ì¤Æ¤¤¤ë¤â¤Î¤Ç¤¢¤ë¡¥¾åµ­Ãøºî¸¢¼Ô¤ª
+ *  ¤è¤ÓTOPPERS¥×¥í¥¸¥§¥¯¥È¤Ï¡¤ËÜ¥½¥Õ¥È¥¦¥§¥¢¤Ë´Ø¤·¤Æ¡¤¤½¤ÎŬÍѲÄǽÀ­¤â
+ *  ´Þ¤á¤Æ¡¤¤¤¤«¤Ê¤ëÊݾڤâ¹Ô¤ï¤Ê¤¤¡¥¤Þ¤¿¡¤ËÜ¥½¥Õ¥È¥¦¥§¥¢¤ÎÍøÍѤˤè¤êľ
+ *  ÀÜŪ¤Þ¤¿¤Ï´ÖÀÜŪ¤ËÀ¸¤¸¤¿¤¤¤«¤Ê¤ë»³²¤Ë´Ø¤·¤Æ¤â¡¤¤½¤ÎÀÕǤ¤òÉé¤ï¤Ê¤¤¡¥
+ * 
+ *  @(#) $Id: cyclic.h,v 1.5 2003/06/04 01:46:16 hiro Exp $
+ */
+
+/*
+ *     ¼þ´ü¥Ï¥ó¥É¥éµ¡Ç½
+ */
+
+#ifndef _CYCLIC_H_
+#define _CYCLIC_H_
+
+#include "queue.h"
+#include "time_event.h"
+
+/*
+ *  ¼þ´ü¥Ï¥ó¥É¥é½é´ü²½¥Ö¥í¥Ã¥¯
+ */
+typedef struct cyclic_handler_initialization_block {
+       ATR     cycatr;         /* ¼þ´ü¥Ï¥ó¥É¥é°À­ */
+       VP_INT  exinf;          /* ¼þ´ü¥Ï¥ó¥É¥é¤Î³ÈÄ¥¾ðÊó */
+       FP      cychdr;         /* ¼þ´ü¥Ï¥ó¥É¥é¤Îµ¯Æ°ÈÖÃÏ */
+       RELTIM  cyctim;         /* ¼þ´ü¥Ï¥ó¥É¥é¤Îµ¯Æ°¼þ´ü */
+       RELTIM  cycphs;         /* ¼þ´ü¥Ï¥ó¥É¥é¤Îµ¯Æ°°ÌÁê */
+} CYCINIB;
+
+/*
+ *  ¼þ´ü¥Ï¥ó¥É¥é´ÉÍý¥Ö¥í¥Ã¥¯
+ */
+typedef struct cyclic_handler_control_block {
+       const CYCINIB *cycinib; /* ¼þ´ü¥Ï¥ó¥É¥é½é´ü²½¥Ö¥í¥Ã¥¯¤Ø¤Î¥Ý¥¤¥ó¥¿ */
+       BOOL    cycsta;         /* ¼þ´ü¥Ï¥ó¥É¥é¤ÎÆ°ºî¾õÂÖ */
+       EVTTIM  evttim;         /* ¼¡¤Ë¼þ´ü¥Ï¥ó¥É¥é¤òµ¯Æ°¤¹¤ë»þ¹ï */
+       TMEVTB  tmevtb;         /* ¥¿¥¤¥à¥¤¥Ù¥ó¥È¥Ö¥í¥Ã¥¯ */
+} CYCCB;
+
+/*
+ *  ¼þ´ü¥Ï¥ó¥É¥éµ¡Ç½¤Î½é´ü²½
+ */
+extern void    cyclic_initialize(void);
+
+/*
+ *  ¼þ´ü¥Ï¥ó¥É¥éµ¯Æ°¤Î¤¿¤á¤Î¥¿¥¤¥à¥¤¥Ù¥ó¥È¥Ö¥í¥Ã¥¯¤ÎÅÐÏ¿
+ */
+extern void    tmevtb_enqueue_cyc(CYCCB *cyccb, EVTTIM evttim);
+
+/*
+ *  ¼þ´ü¥Ï¥ó¥É¥éµ¯Æ°¥ë¡¼¥Á¥ó
+ */
+extern void    call_cychdr(CYCCB *cyccb);
+
+#endif /* _CYCLIC_H_ */