/** * @file % !FILENAME % * * @section File description * * This file gathers system call declarations. * * Generated from application % !CPUNAME % * Automatically generated by goil on % !TIMESTAMP % * from root OIL file % !OILFILENAME % * * @section File informations * * $Date$ * $Rev$ * $Author$ * $URL$ */ #ifndef TPL_OS_H #define TPL_OS_H #ifdef __cplusplus extern "C" { #endif #include "tpl_os_definitions.h" #include "tpl_os_application_def.h" #include "tpl_os_error.h"% if OS::SCALABILITYCLASS > 0 then % #include "tpl_as_definitions.h" #include "tpl_as_error.h"% end if if exists OS::TIMINGPROTECTION default (false) then % #include "tpl_as_protec_hook.h"% end if template if exists extra_headers #---------------------------------------------------------------------------* # Add the C library headers #---------------------------------------------------------------------------* let countCPPHeader := 0 foreach lib in PRIMARYUSEDLIB do if exists lib::CPPHEADER then let countCPPHeader := countCPPHeader + [lib::CPPHEADER length] end if foreach header in exists lib::CHEADER default ( @() ) do % #include "% !header::VALUE %"% end foreach end foreach foreach api in APIUSED do % /*--------------------------------------------------------------------------* * % !api::NAME % system calls. * corresponding kernel implementation is in files% foreach file in api::FILE do% * % !file::VALUE %.h and % !file::VALUE %.c% end foreach% *--------------------------------------------------------------------------*/% foreach header in exists api::HEADER default ( @() ) do% #include "% !header::VALUE %.h"% end foreach% % foreach sc in api::SYSCALL do let hidden := exists sc::HIDDEN default (false) let actual := exists sc::ACTUAL if not hidden & not actual then % /* * % !sc::NAME % * % ![[[sc::NAME description] wrap :70,0] columnPrefixedBy :" * "] foreach arg in exists sc::ARGUMENT default ( @() ) do % * % ![[arg::NAME+": "+[arg::NAME description] wrap :70,[arg::NAME length]+3] columnPrefixedBy : " * "] end foreach if exists sc::RETURN_TYPE then% * * Return value: % ![[[sc::RETURN_TYPE description] wrap :70,4] columnPrefixedBy: " * "] end if% */ FUNC(% !exists sc::RETURN_TYPE default("void") %, % !api::ID_PREFIX %_CODE) % !sc::NAME %(% if exists sc::ARGUMENT then foreach arg in sc::ARGUMENT do % % !arg::KIND %(% !arg::TYPE %, AUTOMATIC% if [arg::KIND subStringExists: "P2"] then %, OS_APPL_DATA% end if %) % !arg::NAME between %,% end foreach %)% else %void)% end if %; % end if end foreach end foreach #---------------------------------------------------------------------------* # Add the declaration of TASKS, RESOURCES, ALARMS, EVENT, MESSAGES and so on #---------------------------------------------------------------------------* % /* * Objects declared in the OIL/ARXML file */% foreach appmode in APPMODE do % DeclareApplicationMode(% !appmode::NAME %);% end foreach foreach task in TASK do % DeclareTask(% !task::NAME %);% end foreach foreach resource in RESOURCE do if resource::RESOURCEPROPERTY == "STANDARD" then % DeclareResource(% !resource::NAME %);% end if end foreach foreach alarm in ALARM do % DeclareAlarm(% !alarm::NAME %);% end foreach foreach event in EVENT do % DeclareEvent(% !event::NAME %);% end foreach foreach message in MESSAGE do % DeclareMessage(% !message::NAME %);% end foreach foreach application in APPLICATION do % DeclareApplication(% !application::NAME %);% end foreach foreach scheduletable in SCHEDULETABLE do % DeclareScheduleTable(% !scheduletable::NAME %);% end foreach % #ifdef __cplusplus } #endif % #---------------------------------------------------------------------------* # Add the CPP library headers #---------------------------------------------------------------------------* if countCPPHeader > 0 then % #ifdef __cplusplus% end if foreach lib in PRIMARYUSEDLIB do foreach header in exists lib::CPPHEADER default ( @() ) do % #include "% !header::VALUE %"% end foreach end foreach if countCPPHeader > 0 then % #endif% end if % % if [TRANSACTION length] > 0 then foreach obj in OBJECT before % /* * Declaration of STM-HRT shared data */ % do % /* Data % !obj::DATA_NAME % */ extern % !obj::DATA_TYPE % % !obj::DATA_NAME %; % end foreach end if % /* TPL_OS_H */ #endif /* End of file % !FILENAME % */