00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00047 #ifndef TOPPERS_COMPLEMENT_HPP_
00048 #define TOPPERS_COMPLEMENT_HPP_
00049
00050 #include <toppers/config.hpp>
00051
00052 struct t_ctsk;
00053 struct t_rtsk;
00054 struct t_rtst;
00055 struct t_dtex;
00056 struct t_rtex;
00057 struct t_csem;
00058 struct t_rsem;
00059 struct t_cflg;
00060 struct t_rflg;
00061 struct t_cdtq;
00062 struct t_rdtq;
00063 struct t_cmbx;
00064 struct t_rmbx;
00065 struct t_msg;
00066 struct t_msg_pri;
00067 struct t_cmtx;
00068 struct t_rmtx;
00069 struct t_cmbf;
00070 struct t_rmbf;
00071 struct t_cpor;
00072 struct t_rpor;
00073 struct t_rrdv;
00074 struct t_cmpf;
00075 struct t_rmpf;
00076 struct t_cmpl;
00077 struct t_rmpl;
00078 struct t_ccyc;
00079 struct t_rcyc;
00080 struct t_calm;
00081 struct t_ralm;
00082 struct t_dovr;
00083 struct t_rovr;
00084 struct t_rsys;
00085 struct t_dinh;
00086 struct t_cisr;
00087 struct t_risr;
00088 struct t_dsvc;
00089 struct t_dexc;
00090 struct t_rcfg;
00091 struct t_rver;
00092
00093
00094
00095
00096 namespace toppers_private
00097 {
00098 struct large_type
00099 {
00100 ER fake1_;
00101 ER_ID fake2_;
00102 ER_UINT fake3_;
00103 };
00104
00105 struct yes_type { char fake_; };
00106 struct no_type { char fake_[2]; };
00107
00108 large_type (cre_tsk)(...);
00109 large_type (acre_tsk)(...);
00110 large_type (del_tsk)(...);
00111 large_type (sta_tsk)(...);
00112 void (exd_tsk)(int);
00113 large_type (ref_tsk)(...);
00114 large_type (ref_tst)(...);
00115 large_type (def_tex)(...);
00116 large_type (ref_tex)(...);
00117 large_type (cre_sem)(...);
00118 large_type (acre_sem)(...);
00119 large_type (del_sem)(...);
00120 large_type (ref_sem)(...);
00121 large_type (cre_flg)(...);
00122 large_type (acre_flg)(...);
00123 large_type (del_flg)(...);
00124 large_type (ref_flg)(...);
00125 large_type (cre_dtq)(...);
00126 large_type (acre_dtq)(...);
00127 large_type (del_dtq)(...);
00128 large_type (ref_dtq)(...);
00129 large_type (cre_mbx)(...);
00130 large_type (acre_mbx)(...);
00131 large_type (del_mbx)(...);
00132 large_type (ref_mbx)(...);
00133 large_type (cre_mtx)(...);
00134 large_type (acre_mtx)(...);
00135 large_type (del_mtx)(...);
00136 large_type (loc_mtx)(...);
00137 large_type (ploc_mtx)(...);
00138 large_type (tloc_mtx)(...);
00139 large_type (unl_mtx)(...);
00140 large_type (ref_mtx)(...);
00141 large_type (cre_mbf)(...);
00142 large_type (acre_mbf)(...);
00143 large_type (del_mbf)(...);
00144 large_type (snd_mbf)(...);
00145 large_type (psnd_mbf)(...);
00146 large_type (tsnd_mbf)(...);
00147 large_type (rcv_mbf)(...);
00148 large_type (prcv_mbf)(...);
00149 large_type (trcv_mbf)(...);
00150 large_type (ref_mbf)(...);
00151 large_type (cre_por)(...);
00152 large_type (acre_por)(...);
00153 large_type (del_por)(...);
00154 large_type (cal_por)(...);
00155 large_type (tcal_por)(...);
00156 large_type (acp_por)(...);
00157 large_type (pacp_por)(...);
00158 large_type (tacp_por)(...);
00159 large_type (fwd_por)(...);
00160 large_type (rpl_rdv)(...);
00161 large_type (ref_por)(...);
00162 large_type (ref_rdv)(...);
00163 large_type (cre_mpf)(...);
00164 large_type (acre_mpf)(...);
00165 large_type (del_mpf)(...);
00166 large_type (ref_mpf)(...);
00167 large_type (set_tim)(...);
00168 large_type (cre_mpl)(...);
00169 large_type (acre_mpl)(...);
00170 large_type (del_mpl)(...);
00171 large_type (get_mpl)(...);
00172 large_type (pget_mpl)(...);
00173 large_type (tget_mpl)(...);
00174 large_type (rel_mpl)(...);
00175 large_type (ref_mpl)(...);
00176 large_type (cre_cyc)(...);
00177 large_type (acre_cyc)(...);
00178 large_type (del_cyc)(...);
00179 large_type (ref_cyc)(...);
00180 large_type (cre_alm)(...);
00181 large_type (acre_alm)(...);
00182 large_type (del_alm)(...);
00183 large_type (sta_alm)(...);
00184 large_type (stp_alm)(...);
00185 large_type (ref_alm)(...);
00186 large_type (def_ovr)(...);
00187 large_type (sta_ovr)(...);
00188 large_type (stp_ovr)(...);
00189 large_type (ref_ovr)(...);
00190 large_type (ref_sys)(...);
00191 large_type (def_inh)(...);
00192 large_type (cre_isr)(...);
00193 large_type (acre_isr)(...);
00194 large_type (del_isr)(...);
00195 large_type (ref_isr)(...);
00196 large_type (dis_int)(...);
00197 large_type (ena_int)(...);
00198 large_type (chg_ims)(...);
00199 large_type (chg_ipm)(...);
00200 large_type (get_ixx)(...);
00201 large_type (get_ims)(...);
00202 large_type (get_ipm)(...);
00203 large_type (def_svc)(...);
00204 large_type (cal_svc)(...);
00205 large_type (def_exc)(...);
00206 large_type (ref_cfg)(...);
00207 large_type (ref_ver)(...);
00208 large_type (vxsns_ctx)(...);
00209 large_type (vxsns_loc)(...);
00210 large_type (vxsns_dsp)(...);
00211 large_type (vxsns_dpn)(...);
00212 large_type (vxsns_tex)(...);
00213 large_type (vxget_tim)(...);
00214 large_type (cal_svc)(...);
00215
00216 yes_type test_svc(void (*)());
00217 yes_type test_svc(BOOL (*)());
00218 no_type test_svc(...);
00219
00220 #if !defined(sta_ovr) && !defined(OVRTIM) && !defined(TOPPERS_HAS_OVRTIM)
00221
00222 char (*test_ovrtim(ER (*)(ID, unsigned char)))[1];
00223 char (*test_ovrtim(ER (*)(ID, unsigned short)))[2];
00224 char (*test_ovrtim(ER (*)(ID, unsigned int)))[3];
00225 char (*test_ovrtim(ER (*)(ID, unsigned long)))[4];
00226 #ifdef TOPPERS_LONG_LONG
00227 char (*test_ovrtim(ER (*)(ID, unsigned TOPPERS_LONG_LONG)))[5];
00228 #endif
00229 char (*test_ovrtim(...))[6];
00230
00231 template <int> struct typeof_ovrtim { typedef UINT type; };
00232 template <> struct typeof_ovrtim<1> { typedef unsigned char type; };
00233 template <> struct typeof_ovrtim<2> { typedef unsigned short type; };
00234 template <> struct typeof_ovrtim<3> { typedef unsigned int type; };
00235 template <> struct typeof_ovrtim<4> { typedef unsigned long type; };
00236 #ifdef TOPPERS_LONG_LONG
00237 template <> struct typeof_ovrtim<5> { typedef unsigned TOPPERS_LONG_LONG type; };
00238 #endif
00239
00240 #endif
00241
00242 #if !defined(chg_ims) && !defined(IMS) && !defined(TOPPERS_HAS_IMS)
00243
00244 char (*test_chg_ims(ER (*)(unsigned char)))[1];
00245 char (*test_chg_ims(ER (*)(unsigned short)))[2];
00246 char (*test_chg_ims(ER (*)(unsigned int)))[3];
00247 char (*test_chg_ims(ER (*)(unsigned long)))[4];
00248 #ifdef TOPPERS_LONG_LONG
00249 char (*test_chg_ims(ER (*)(unsigned TOPPERS_LONG_LONG)))[5];
00250 #endif
00251 char (*test_chg_ims(...))[6];
00252
00253 template <int> struct typeof_ims { typedef UINT type; };
00254 template <> struct typeof_ims<1> { typedef unsigned char type; };
00255 template <> struct typeof_ims<2> { typedef unsigned short type; };
00256 template <> struct typeof_ims<3> { typedef unsigned int type; };
00257 template <> struct typeof_ims<4> { typedef unsigned long type; };
00258 #ifdef TOPPERS_LONG_LONG
00259 template <> struct typeof_ims<5> { typedef unsigned TOPPERS_LONG_LONG type; };
00260 #endif
00261
00262 #endif
00263
00264 #if !defined(vxget_tim) && !defined(SYSUTIM) && !defined(TOPPERS_HAS_SYSUTIM)
00265
00266 char (*test_vxget_tim(ER (*)(unsigned char*)))[1];
00267 char (*test_vxget_tim(ER (*)(unsigned short*)))[2];
00268 char (*test_vxget_tim(ER (*)(unsigned int*)))[3];
00269 char (*test_vxget_tim(ER (*)(unsigned long*)))[4];
00270 #ifdef TOPPERS_LONG_LONG
00271 char (*test_vxget_tim(ER (*)(unsigned TOPPERS_LONG_LONG*)))[5];
00272 #endif
00273 char (*test_vxget_tim(...))[6];
00274
00275 template <int> struct typeof_sysutim { typedef UINT type; };
00276 template <> struct typeof_sysutim<1> { typedef unsigned char type; };
00277 template <> struct typeof_sysutim<2> { typedef unsigned short type; };
00278 template <> struct typeof_sysutim<3> { typedef unsigned int type; };
00279 template <> struct typeof_sysutim<4> { typedef unsigned long type; };
00280 #ifdef TOPPERS_LONG_LONG
00281 template <> struct typeof_sysutim<5> { typedef unsigned TOPPERS_LONG_LONG type; };
00282 #endif
00283
00284 #endif
00285
00286 #ifndef TBIT_RDVPTN
00287 typedef UINT RDVPTN;
00288 typedef INT RDVNO;
00289 #endif
00290
00291 }
00292
00293 namespace toppers
00294 {
00295
00296 using namespace toppers_private;
00297
00298 #if !defined(sta_ovr) && !defined(OVRTIM) && !defined(TOPPERS_HAS_OVRTIM)
00299 typedef typeof_ovrtim<sizeof *test_ovrtim(&sta_ovr)>::type OVRTIM;
00300 #endif
00301
00302 #if !defined(chg_ims) && !defined(IMS) && !defined(TOPPERS_HAS_IMS)
00303 typedef typeof_ims<sizeof *test_chg_ims(&chg_ims)>::type IMS;
00304 #endif
00305
00306 #if !defined(vxget_tim) && !defined(SYSUTIM) && !defined(TOPPERS_HAS_SYSUTIM)
00307 typedef typeof_sysutim<sizeof *test_vxget_tim(&vxget_tim)>::type SYSUTIM;
00308 #endif
00309
00310 #ifndef INHNO
00311 typedef UINT INHNO;
00312 #endif
00313 #ifndef INTNO
00314 typedef UINT INTNO;
00315 #endif
00316 }
00317
00318 #endif // ! TOPPERS_COMPLEMENT_HPP_