OSDN Git Service

Merge branch 'develop'
[trx-305dsp/dsp.git] / hirado / kernel / include / kernel_cfg.h
1 /*
2  *  TOPPERS/JSP Kernel
3  *      Toyohashi Open Platform for Embedded Real-Time Systems/
4  *      Just Standard Profile Kernel
5  * 
6  *  Copyright (C) 2003 by Embedded and Real-Time Systems Laboratory
7  *                              Toyohashi Univ. of Technology, JAPAN
8  * 
9  *  上記著作権者は,以下の (1)〜(4) の条件か,Free Software Foundation 
10  *  によって公表されている GNU General Public License の Version 2 に記
11  *  述されている条件を満たす場合に限り,本ソフトウェア(本ソフトウェア
12  *  を改変したものを含む.以下同じ)を使用・複製・改変・再配布(以下,
13  *  利用と呼ぶ)することを無償で許諾する.
14  *  (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作
15  *      権表示,この利用条件および下記の無保証規定が,そのままの形でソー
16  *      スコード中に含まれていること.
17  *  (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使
18  *      用できる形で再配布する場合には,再配布に伴うドキュメント(利用
19  *      者マニュアルなど)に,上記の著作権表示,この利用条件および下記
20  *      の無保証規定を掲載すること.
21  *  (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使
22  *      用できない形で再配布する場合には,次のいずれかの条件を満たすこ
23  *      と.
24  *    (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著
25  *        作権表示,この利用条件および下記の無保証規定を掲載すること.
26  *    (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに
27  *        報告すること.
28  *  (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損
29  *      害からも,上記著作権者およびTOPPERSプロジェクトを免責すること.
30  * 
31  *  本ソフトウェアは,無保証で提供されているものである.上記著作権者お
32  *  よびTOPPERSプロジェクトは,本ソフトウェアに関して,その適用可能性も
33  *  含めて,いかなる保証も行わない.また,本ソフトウェアの利用により直
34  *  接的または間接的に生じたいかなる損害に関しても,その責任を負わない.
35  * 
36  *  @(#) $Id: kernel_cfg.h,v 1.1 2009/01/31 05:27:37 suikan Exp $
37  */
38
39 /*
40  *  kernel_cfg.c 用インクルードファイル
41  */
42
43 #ifndef _KERNEL_CFG_H_
44 #define _KERNEL_CFG_H_
45
46 /*
47  *  カーネル標準インクルードファイル
48  */
49 #include <../kernel/jsp_kernel.h>
50
51 /*
52  *  カーネルの各インクルードファイル
53  */
54 #include <../kernel/task.h>
55 #include <../kernel/semaphore.h>
56 #include <../kernel/eventflag.h>
57 #include <../kernel/dataqueue.h>
58 #include <../kernel/mailbox.h>
59 #include <../kernel/mempfix.h>
60 #include <../kernel/cyclic.h>
61 #include <../kernel/interrupt.h>
62 #include <../kernel/exception.h>
63 #include <../kernel/time_event.h>
64
65 /*
66  *  カーネルのワークエリアを定義するためのデータ型
67  *
68  *  スタック領域と固定長メモリプール領域を,VP型のサイズよりも大きい単
69  *  位でアラインさせる必要がある場合には,__STK_UNIT と__MPF_UNIT を,
70  *  それぞれアラインさせる単位のデータ型に定義する.
71  *
72  *  以下の定義は,__STK_UNIT および __MPF_UNIT のサイズが 2の巾乗であ
73  *  ることを仮定している.
74  */
75
76 #ifndef __STK_UNIT
77 typedef VP  __STK_UNIT;
78 #endif /* __STK_UNIT */
79
80 #ifndef __MPF_UNIT
81 typedef VP  __MPF_UNIT;
82 #endif /* __MPF_UNIT */
83
84 #define __TROUND_STK_UNIT(sz) \
85         (((sz) + sizeof(__STK_UNIT) - 1) & ~(sizeof(__STK_UNIT) - 1))
86 #define __TCOUNT_STK_UNIT(sz) \
87         (((sz) + sizeof(__STK_UNIT) - 1) / sizeof(__STK_UNIT))
88
89 #define __TROUND_MPF_UNIT(sz) \
90         (((sz) + sizeof(__MPF_UNIT) - 1) & ~(sizeof(__MPF_UNIT) - 1))
91 #define __TCOUNT_MPF_UNIT(sz) \
92         (((sz) + sizeof(__MPF_UNIT) - 1) / sizeof(__MPF_UNIT))
93
94 /*
95  *  リネームしたシンボルを元に戻すためのインクルードファイル
96  */
97 #include <../kernel/jsp_unrename.h>
98 #include <sys_unrename.h>
99 #include <cpu_unrename.h>
100
101 #endif /* _KERNEL_CFG_H_ */