/** * @file % !FILENAME % * * @section desc File description * * Header of the service ids for application % !CPUNAME % * Automatically generated by goil on % !TIMESTAMP % * from root OIL file % !OILFILENAME % * * @section copyright Copyright * * Trampoline OS * * Trampoline is copyright (c) IRCCyN 2005-2010 * Trampoline is protected by the French intellectual property law. * * This software is distributed under the Lesser GNU Public Licence * * @section infos File informations * * $Date$ * $Rev$ * $Author$ * $URL$ */ #ifndef TPL_SERVICES_IDS_H #define TPL_SERVICES_IDS_H #include "tpl_config_def.h" /*============================================================================= * service ids */ % # Build a map of system calls with key NAME and fields ID_PREFIX, CALLABLE_BY_ISR1 # Build a list of system calls sorted by CALLABLE_BY_ISR1 let mapOfApi := @[ ] let listOfApiFunc := @( ) foreach api_sec in APIUSED do foreach api_func in api_sec::SYSCALL do let key := api_func::NAME let currentApi::ID_PREFIX := api_sec::ID_PREFIX let currentApi::CALLABLE_BY_ISR1 := api_func::CALLABLE_BY_ISR1 let listOfApiFunc += api_func if not exists mapOfApi[key] then let mapOfApi[key] := currentApi end if end foreach end foreach sort listOfApiFunc by CALLABLE_BY_ISR1 > let system_call_count := 0 let system_call_isr1_count := 0 foreach api_func in listOfApiFunc do let key := api_func::NAME % /** * @def % !mapOfApi[key]::ID_PREFIX %ServiceId_% !key % * * @see #SERVICE_CALL_DESCRIPTOR * @see #% !key % */ #define % !mapOfApi[key]::ID_PREFIX %ServiceId_% !key % % !system_call_count % % let system_call_count += 1 if mapOfApi[key]::CALLABLE_BY_ISR1 then let system_call_isr1_count += 1 end if end foreach % /** * @def SYSCALL_COUNT * * Number of system calls */ #define SYSCALL_COUNT % !system_call_count % #define SYSCALL_COUNT_ISR1 % !system_call_isr1_count % #endif /* End of file TPL_SERVICES_IDS_H */