Sample Definition Code Generated Declare Critical Section(nameid) extern CRITICAL_SECTION $<nameid>; Defines the code for declaring a Critical Section (OS Object). This API is used when generating the code for declaring a Critical Section.This code is generated in the file type_def.h For a Critical Section named: critical_section: Define Critical Section(nameid) CRITICAL_SECTION $<nameid>; Defines the code for defining a Critical Section (OS Object). This API is used when generating the code for defining a Critical Section.This code is generated in the file glob_dat.c For a Critical Section named: critical_section: Create Critical Section(nameid) $<nameid> = CreateCriticalSection(); Defines the code for creating a Critical Section (OS Object). This API is used when generating the code for creating a Critical Section. For a Critical Section named: critical_section: Destroy Critical Section(nameid) DestroyCriticalSection($<nameid>); Defines the code for destroying a Critical Section (OS Object). This API is used when generating the code for destroying a Critical Section.The functionon_exit_code
is called at the end of the generated application. For a Critical Section named: critical_section: Enter Critical Section(nameid) EnterCriticalSection($<nameid>); Defines the code for entering a Critical Section (OS Object). Used when entering a critical section.For example, swapping the double buffered buffers of a Task, may require guarding this code section. The code generator uses this API just before swapping the buffers. For a Critical Section named: critical_section: End Critical Section(nameid) EndCriticalSection($<nameid>); Defines the code for ending a Critical Section (OS Object). Used when exiting a critical section.For example, swapping the double buffered buffers of a Task, may require guarding this code section. The code generator uses this API just after the swapping the buffers. For a Critical Section named: critical_section: