1 | /*
|
---|
2 | * TOPPERS ATK2
|
---|
3 | * Toyohashi Open Platform for Embedded Real-Time Systems
|
---|
4 | * Automotive Kernel Version 2
|
---|
5 | *
|
---|
6 | * Copyright (C) 2013-2014 by Center for Embedded Computing Systems
|
---|
7 | * Graduate School of Information Science, Nagoya Univ., JAPAN
|
---|
8 | * Copyright (C) 2013 by Embedded and Real-Time Systems Laboratory
|
---|
9 | * Graduate School of Information Science, Nagoya Univ., JAPAN
|
---|
10 | *
|
---|
11 | * 上記著作権者は,以下の(1)〜(4)の条件を満たす場合に限り,本ソフトウェ
|
---|
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 | * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを
|
---|
32 | * 免責すること.
|
---|
33 | *
|
---|
34 | * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お
|
---|
35 | * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的
|
---|
36 | * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ
|
---|
37 | * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ
|
---|
38 | * の責任を負わない.
|
---|
39 | *
|
---|
40 | */
|
---|
41 |
|
---|
42 |
|
---|
43 | #ifndef TOPPERS_PRC_SVC_H
|
---|
44 | #define TOPPERS_PRC_SVC_H
|
---|
45 |
|
---|
46 | #ifndef TOPPERS_MACRO_ONLY
|
---|
47 |
|
---|
48 | typedef sint32 FunctionCodeType; /* 機能コードの型 */
|
---|
49 |
|
---|
50 | extern int cal_svc_0m(int fncd) __attribute__((section(".text_shared")));
|
---|
51 | extern int cal_svc_1m(int par1, int fncd) __attribute__((section(".text_shared")));
|
---|
52 | extern int cal_svc_2m(int par1, int par2, int fncd) __attribute__((section(".text_shared")));
|
---|
53 | extern int cal_svc_3m(int par1, int par2, int par3, int fncd) __attribute__((section(".text_shared")));
|
---|
54 |
|
---|
55 | extern void cal_svc_0n(int fncd) __attribute__((section(".text_shared")));
|
---|
56 | extern void cal_svc_1n(int par1, int fncd) __attribute__((section(".text_shared")));
|
---|
57 | extern void cal_svc_2n(int par1, int par2, int fncd) __attribute__((section(".text_shared")));
|
---|
58 | extern void cal_svc_3n(int par1, int par2, int par3, int fncd) __attribute__((section(".text_shared")));
|
---|
59 |
|
---|
60 | #define CAL_SVC_0M(TYPE, FNCD) cal_svc_0m((int)((FunctionCodeType)FNCD))
|
---|
61 |
|
---|
62 | #define CAL_SVC_1M(TYPE, FNCD, TYPE1, PAR1) \
|
---|
63 | cal_svc_1m((int)((TYPE1)PAR1), (int)((FunctionCodeType)FNCD))
|
---|
64 |
|
---|
65 | #define CAL_SVC_2M(TYPE, FNCD, TYPE1, PAR1, TYPE2, PAR2) \
|
---|
66 | cal_svc_2m((int)((TYPE1)PAR1), (int)((TYPE2)PAR2), (int)((FunctionCodeType)FNCD))
|
---|
67 |
|
---|
68 | #define CAL_SVC_3M(TYPE, FNCD, TYPE1, PAR1, \
|
---|
69 | TYPE2, PAR2, TYPE3, PAR3) \
|
---|
70 | cal_svc_3m((int)((TYPE1)PAR1), (int)((TYPE2)PAR2), (int)((TYPE3)PAR3), (int)((FunctionCodeType)FNCD))
|
---|
71 |
|
---|
72 | #define CAL_SVC_0N(TYPE, FNCD) cal_svc_0n((int)((FunctionCodeType)FNCD))
|
---|
73 |
|
---|
74 | #define CAL_SVC_1N(TYPE, FNCD, TYPE1, PAR1) \
|
---|
75 | cal_svc_1n((int)((TYPE1)PAR1), (int)((FunctionCodeType)FNCD))
|
---|
76 |
|
---|
77 | #define CAL_SVC_2N(TYPE, FNCD, TYPE1, PAR1, TYPE2, PAR2) \
|
---|
78 | cal_svc_2n((int)((TYPE1)PAR1), (int)((TYPE2)PAR2), (int)((FunctionCodeType)FNCD))
|
---|
79 |
|
---|
80 | #define CAL_SVC_3N(TYPE, FNCD, TYPE1, PAR1, \
|
---|
81 | TYPE2, PAR2, TYPE3, PAR3) \
|
---|
82 | cal_svc_3n((int)((TYPE1)PAR1), (int)((TYPE2)PAR2), (int)((TYPE3)PAR3), (int)((FunctionCodeType)FNCD))
|
---|
83 |
|
---|
84 | #ifndef TOPPERS_SVC_CALL
|
---|
85 | #include "ghs/tool_svc.h"
|
---|
86 | #endif /* TOPPERS_SVC_CALL */
|
---|
87 |
|
---|
88 | #endif /* TOPPERS_MACRO_ONLY */
|
---|
89 |
|
---|
90 | #endif /* TOPPERS_TARGET_SVC_H */
|
---|
91 |
|
---|